Unsolved QGLWidget in Qt 5.6
-
Hi !
I'm working on a GIS app using Qt and OpenGL.
This app was developped with Qt 4.8.4 and ported it to Qt 5.6, and it use QGLWidget to render GL call in my app.
Those QGLWidgets are inside QMdiSubwindows, and I need to be able to display a few of them at the same times.
I have 3 bugs that I can't solve
- some text corruption when I use the renderText function
- huge flicker on resizing a widget
- wrong repaint when I programmatically move a widget (the part of the widget that need to be repainted is not good)
After hours of test, I know that :
- none of those bugs are here with Qt 5.5
- I can reproduce at least two of them on a tiny Qt examples
- Those examples also shows that QOpenGLWidget solve the problem.
I know I could just switch to QOpenGLWidget, but I can't. A guy upgraded the raw OpenGL code to OpenSceneGraph, which use QGLwidget, and I will have to merge those two version.
So first, is it possible that Qt 5.6 made some large scales changes that QGLWidget didn't get because it's obsolete, and then giving my these nasty bugs ?
Qt docs says this about QGLWidget :
This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
I'm in that "keep old source code working" case, so shall I expect that bugs being corrected by Qt ? Or is it hopeless because the class is obsolete ? Is it worth it to post a bug report about it ?
Or is it any other solution I have missed ?
-
Hi @kragnfrol,
After hours of test, I know that :
- none of those bugs are here with Qt 5.5
- I can reproduce at least two of them on a tiny Qt examples
- Those examples also shows that QOpenGLWidget solve the problem.
I know I could just switch to QOpenGLWidget, but I can't. A guy upgraded the raw OpenGL code to OpenSceneGraph, which use QGLwidget, and I will have to merge those two version.
It sounds like your best bet is to stick to Qt 5.5.
So first, is it possible that Qt 5.6 made some large scales changes that QGLWidget didn't get because it's obsolete, and then giving my these nasty bugs ?
Yes, it's possible. The Qt Project has automated tests to try to prevent regressions like these, but not all regressions are caught.
Those QGLWidgets are inside QMdiSubwindows, and I need to be able to display a few of them at the same times.
Hmm... QGLWidget and QMdiSubWindow never played well with each other. That's one of the reasons QOpenGLWidget was created in the first place.
Qt docs says this about QGLWidget :
This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
I'm in that "keep old source code working" case, so shall I expect that bugs being corrected by Qt ? Or is it hopeless because the class is obsolete ? Is it worth it to post a bug report about it ?
You can post a bug report; it doesn't hurt to try. However, I'm not sure if the Qt engineers will spend time fixing bugs in QGLWidget or not.