Qt5OpenGL: fix flickering on resize
This commit is contained in:
@@ -176,6 +176,7 @@ public:
|
||||
logger->startLogging(QOpenGLDebugLogger::SynchronousLogging);
|
||||
}
|
||||
#endif
|
||||
connect(this, &CustomGLWidget::resized, this, &CustomGLWidget::slotResized);
|
||||
}
|
||||
bool event(QEvent *e)
|
||||
{
|
||||
@@ -199,6 +200,14 @@ public:
|
||||
{
|
||||
qDebug() << message;
|
||||
}
|
||||
void showEvent(QShowEvent*)
|
||||
{
|
||||
update(); // force update when changing window mode
|
||||
}
|
||||
void slotResized()
|
||||
{
|
||||
update(); // fixes flickering on some systems
|
||||
}
|
||||
};
|
||||
#else
|
||||
class CustomGLWidget : public QGLWidget {
|
||||
|
||||
Reference in New Issue
Block a user