在使用rviz的时候会一直弹出以下信息

0x3970590 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x268ddd0) ): 
Attempt to set a screen on a child window.

虽然不影响使用,但还是想解决一下。查询资料发现这是在多显示器连接情况下,rviz和Qt之间的一个bug。

目前rviz作者还没有对此进行修复,因此还没有好的解决办法。

Stack Overflow上对此的回答

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.

 


版权声明:本文为qq_42037180原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/qq_42037180/article/details/109182865