Send a paint after resize correctly from QOpenGLWidget
Due to recreating the underlying framebuffer we absolutely need a re-render. However, going directly through paintGL() is wrong since application code may override paintEvent() instead. Such code would then miss these repaint requests. To overcome this, simply rely on paint events, like the normal code path does. Task-number: QTBUG-49466 Change-Id: I6ddb9eb53bedb1655a9714b9b77faa1c439766a2 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This commit is contained in:
parent
9599ee5ab7
commit
39c0d16a8e
@ -1172,8 +1172,7 @@ void QOpenGLWidget::resizeEvent(QResizeEvent *e)
|
|||||||
|
|
||||||
d->recreateFbo();
|
d->recreateFbo();
|
||||||
resizeGL(width(), height());
|
resizeGL(width(), height());
|
||||||
d->invokeUserPaint();
|
d->sendPaintEvent(QRect(QPoint(0, 0), size()));
|
||||||
d->resolveSamples();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
Reference in New Issue
Block a user