QOpenGLWidget Performance Issue
-
wrote on 18 Aug 2016, 21:42 last edited by JorganMones
When combining a QOpenGLWidget with a regular QWidget on the same form, performance is impaired such that interaction with the other widgets is 'sluggish'.
Below is an example:
- With QGLWidget, slider dragging the slider is 'snappy'
- With QOpenGLWidget, slider dragging is 'sluggish'
QSlider *testWidget = new QSlider(Qt::Horizontal, this); testWidget->resize(400,30); QOpenGLWidget* oglWidget = new QOpenGLWidget(this); //QGLWidget* oglWidget = new QGLWidget(this); oglWidget->resize(60,60); oglWidget->move(0,100);
My questions are:
- Why is QOpenGLWidget behavior so different?
- Is there a configuration for QOpenGLWidget that provides for 'more responsive' rendering?
- Is QGLWidget still viable for new development, even though deprecated?
EDIT :
- Windows 10
- Qt Versions 5.5 and 5.7
EDIT 3 :
These open bug report might explain the cause of the issue:https://bugreports.qt.io/browse/QTBUG-54034?jql=text ~ "QOpenGLWidget"
https://bugreports.qt.io/browse/QTBUG-45192Wrapping in native QWindow has issues.
Is there a solution that still uses QOpenGLWidget (i.e. some way to disable scene composition with other widgets? )
Thanks!
-
Hi and welcome to devnet,
You should also add which version of Qt you are using as well as the OS you are running.
In any case, you should take a look a the bug report system to see if there's something about it.
1/2