Menu

#378 ‘class GLArea’ has no member named ‘devicePixelRatio' in glarea.cpp

v1.0_(example)
closed
nobody
None
1
2014-02-25
2013-12-27
No

Detailed compiler error is below. gcc 4.8.1, QT4.8.4 under ubuntu
Presumably I have incompatible versions, across meshlab and vcglib? Both are latest trunk:

 meshlab: svn://svn.code.sf.net/p/meshlab/code/trunk/meshlab  -r 6272
 vcglib: svn://svn.code.sf.net/p/vcg/code/trunk/vcglib  -r 5054

Is there a combination that is known to work?
The reason I'm doing this build is that ubuntu distribution gives me meshlab 1.3.0, and the distribution kit for 1.3.2 "Download MeshLabSrc_AllInc_v132.tgz" has a strange problem in vcglib (and a persistent one, as reported in tickets 292, 308,354 - at least the trunk version of vcglib does not seem to have this issue).

glarea.cpp: In member function ‘void GLArea::setView()’:
glarea.cpp:1378:41: error: ‘class GLArea’ has no member named ‘devicePixelRatio’
     glViewport(0,0, this->width()*this->devicePixelRatio(),this->height()*this->devicePixelRatio());
                                         ^
glarea.cpp:1378:81: error: ‘class GLArea’ has no member named ‘devicePixelRatio’
     glViewport(0,0, this->width()*this->devicePixelRatio(),this->height()*this->devicePixelRatio());

Related

Bugs: #378

Discussion

  • Matthew Ewer

    Matthew Ewer - 2014-01-09

    I'm having the same problem. It may be related to Qt somehow - glarea.cpp is a subclass of QGLWidget. Not sure what to do about it yet, though.

     
  • Viorik

    Viorik - 2014-01-16

    Hi,
    I have Qt4.8.1, and I wanted to install Meshlab 1.3.2 for the "Mutual Information" filter. However, the latest trunk in svn is 1.3.3, which I didn't manage to compile; I got the same error as the one mentioned above, and I don't understand what is happening. Clearly, it is a compatibility problem with the Qt version. devicePixelRatio seems to be defined in QWindow, which was introduced in Qt5, so Meshlab 1.3.3 needs maybe Qt5? Anyway, I tried to compile after installing Qt5, but then it complained about a missing QAction, which existed in Qt4, but not anymore in Qt5. So I don't understand the problem.
    Luckily, I managed to compile MeshLabSrc_AllInc_v132.tgz, (using the vcglib from the package), in command line (not with Qtcreator). There are two parts in the compilation, first compile external libraries, and then meshlab. It worked for me.
    I am curious though about the 1.3.3 issue.

    cheers,
    v.

     
  • Rosewelltech

    Rosewelltech - 2014-02-13

    Based on this description -> http://qt-project.org/doc/qt-4.8/qwidget.html#width-prop

    "By default, this property contains a value that depends on the user's platform and screen geometry."

    Change: glViewport(0,0, this->width()this->devicePixelRatio(),this->height()this->devicePixelRatio());

    To: glViewport(0,0, this->width(),this->height());

    This change does not seem to affect the application and will allow it to compile. I do not know much about the QT libs, so I am unsure of the authors original intention, but at least you will be able to compile from SVN.

    Now kick back, relax, and download Monkey! for Android 2.2+ -> http://tinyurl.com/qzheslg

     
    • Guido Ranzuglia

      Guido Ranzuglia - 2014-02-13

      You should compile MeshLab with a Qt version >= 5.0. This change has
      been introduced to support retina display.

      Il 13/02/2014 21:35, Rosewelltech ha scritto:

      Based on this description ->
      http://qt-project.org/doc/qt-4.8/qwidget.html#width-prop

      "By default, this property contains a value that depends on the user's
      platform and screen geometry."

      Change: glViewport(0,0,
      this->width()/this->devicePixelRatio(),this->height()/this->devicePixelRatio());

      To: glViewport(0,0, this->width(),this->height());

      This change does not seem to affect the application and will allow it
      to compile. I do not know much about the QT libs, so I am unsure of
      the authors original intention, but at least you will be able to
      compile from SVN.

      Now kick back, relax, and download Monkey! for Android 2.2+ ->
      http://tinyurl.com/qzheslg


      [bugs:#378] http://sourceforge.net/p/meshlab/bugs/378/ ‘class
      GLArea’ has no member named ‘devicePixelRatio' in glarea.cpp

      Status: open
      Created: Fri Dec 27, 2013 10:24 PM UTC by Gregory Smith
      Last Updated: Thu Jan 16, 2014 09:33 PM UTC
      Owner: nobody

      Detailed compiler error is below. gcc 4.8.1, QT4.8.4 under ubuntu
      Presumably I have incompatible versions, across meshlab and vcglib?
      Both are latest trunk:

      meshlab: svn://svn.code.sf.net/p/meshlab/code/trunk/meshlab -r 6272
      vcglib: svn://svn.code.sf.net/p/vcg/code/trunk/vcglib -r 5054

      Is there a combination that is known to work?
      The reason I'm doing this build is that ubuntu distribution gives me
      meshlab 1.3.0, and the distribution kit for 1.3.2 "Download
      MeshLabSrc_AllInc_v132.tgz" has a strange problem in vcglib (and a
      persistent one, as reported in tickets 292, 308,354 - at least the
      trunk version of vcglib does not seem to have this issue).

      glarea.cpp: In member function ‘void GLArea::setView()’:
      glarea.cpp:1378:41: error: ‘class GLArea’ has no member named ‘devicePixelRatio’
      glViewport(0,0, this->width()this->devicePixelRatio(),this->height()this->devicePixelRatio());
      ^
      glarea.cpp:1378:81: error: ‘class GLArea’ has no member named ‘devicePixelRatio’
      glViewport(0,0, this->width()this->devicePixelRatio(),this->height()this->devicePixelRatio());


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/meshlab/bugs/378/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #378

  • Paolo Cignoni

    Paolo Cignoni - 2014-02-25
    • status: open --> closed
     
  • Paolo Cignoni

    Paolo Cignoni - 2014-02-25

    Closed.
    https://sourceforge.net/p/meshlab/code/6299/

    It was a leftover in the process of adding nice retina display support using qt5 features.

     

Log in to post a comment.