gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.17k stars 478 forks source link

Multiple monitors Linux causing QT warnings #2571

Open osrf-migration opened 5 years ago

osrf-migration commented 5 years ago

Original report (archived issue) by Mike Lyons (Bitbucket: m1kelyons).


Replication: Running gazebo --verbose on multiple monitors on Linux (Ubuntu 16.04 LTS) causes the following warnings

[Wrn] [GuiIface.cc:120] 0x423fbb0 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x1126120) ): Attempt to set a screen on a child window.
[Wrn] [GuiIface.cc:120] 0x423f830 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x1126120) ): Attempt to set a screen on a child window.
...
osrf-migration commented 5 years ago

Original comment by Mike Lyons (Bitbucket: m1kelyons).


I found this reference: This may be an OpenGL context issue

https://stackoverflow.com/questions/33545006/qt5-attempt-to-set-a-screen-on-a-child-window-many-runtime-warning-messages

"The warning messages occur whenever setMinimumWidth() / setMinimumHeight() are called on a QGLWidget under Linux with a dual screen display. This is probably a bug in Qt. It will probably be not fixed, since it is recommended in the documentation to use the new QOpenGLWidget instead, that appeared in Qt 5.4 (note: "OpenGL" instead of "GL"), which I did and the warning messages disappeared.

Edit: I saw a message from someone that had problems with text not rendering properly with the new QOpenGLWidget which I answer here: When using the new QOpenGLWidget, one needs to take care that it no longer has an independent OpenGL context, it shares the OpenGL context with Qt (therefore, OpenGL states modified in the rendering function needs to be restored after exiting the rendering function, for instance blending mode)."