In our Qt5-based application, the console displays messages such as:
0x1beccb0 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xd25b80) ): Attempt to set a screen on a child window.
This does not prevent the application from starting, but I would like to fix them, since it tends to indicate that we are probably doing something wrong. The code is quite large (cannot be included in the message, it is: http://gforge.inria.fr/frs/?group_id=1465 ). I can't ask you to look at it (too big), but maybe you will have an idea with the following additional information:
Messages appear only under Linux, not under Windows
Our application is a three-dimensional fashion designer that has several QGLWidgets for displaying 3D content. If I delete QGLWidgets, the messages disappear.
In the debugger, if I set a breakpoint on QWindowPrivate :: setTopLevelScreen (), it is called:
kernel /qwindow.cpp: 368 368 q-> connect (screen, SIGNAL (destroyed (QObject *)), q, SLOT (screenDestroyed (QObject *)));
Update1: I set a breakpoint on QMessageLogger :: warning (qDebug () is a macro that uses this function), now I can better see the stack, which looks like this:
#0 0x00007fffefa50600 in QMessageLogger::warning() const@plt () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #1 0x00007fffefa851cb in QWindowPrivate::setTopLevelScreen (this=0xd330e0, newScreen=0x7201a0, recreate=<optimized out>) at kernel/qwindow.cpp:371 #2 0x00007fffefa7f2f5 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x760600) at kernel/qguiapplication.cpp:1608 #3 0x00007fffefa631f8 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:625 #4 0x00007fffeb7d4100 in userEventSourceDispatch (source=<optimized out>) at eventdispatchers/qeventdispatcher_glib.cpp:70 (More stack frames follow...)
QGuiApplicationPrivate :: processWindowSystemEvent handles the QWindowSystemInterfacePrivate :: ThemeChange event:
1608 case QWindowSystemInterfacePrivate::ThemeChange: 1609 QGuiApplicationPrivate::processThemeChanged( 1610 static_cast<QWindowSystemInterfacePrivate::ThemeChangeEvent *>(e)); 1611 break;
Update2: Somewhere over there !! This is when I call setMinimumWidth () / setMinimumHeight () in a QGLWidget. Now I would like to know why ...
Update3: Additional Information: Messages are displayed only if there are two screens connected to my computer.
qt5
Brunolevy
source share