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:
Laszlo Agocs 2015-11-19 10:31:34 +01:00
parent 9599ee5ab7
commit 39c0d16a8e

View File

@ -1172,8 +1172,7 @@ void QOpenGLWidget::resizeEvent(QResizeEvent *e)
d->recreateFbo();
resizeGL(width(), height());
d->invokeUserPaint();
d->resolveSamples();
d->sendPaintEvent(QRect(QPoint(0, 0), size()));
}
/*!