‘class GLArea’ has no member named ‘devicePixelRatio' in glarea.cpp
A processing system for 3D triangular meshes
Brought to you by:
cignoni,
granzuglia
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());
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.
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.
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
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:
Related
Bugs:
#378Closed.
https://sourceforge.net/p/meshlab/code/6299/
It was a leftover in the process of adding nice retina display support using qt5 features.