Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.0
-
None
Description
Dear Support-Team,
I am working on an application where a QOpenGLWidget gets shown and hidden depending on the user input. I intended to use Multisampling. During the first showEvent(..) everything is fine, Calling showEvent(..) again leads to loss of the multisampling. I had a look at the source code of QOpenGLWidget. During the private call of QOpenGLWidgetPrivate::initialize(), the number of samples of the given QSurfaceFormat gets stored in a variable called "requestedSamples", while the number of samples in the stored QSurfaceFormat "requestedFormat" is overwritten with 0. (lines 813 .. 818)
The variable "requestedSamples" is then used in QOpenGLWidgetPrivate::restoreFBO(). This works for the first time the widget is shown. A second call to QOpenGLWidgetPrivate::initialize() leads to storing the overwritten number of samples (0) to the variable requestedSamples and with that it switches of multisampling.
Best regards