Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.2
Description
Reproducer attached. It features a ParentWidget which does 2 things:
1. Provide a button that you can interact with.
2. Brings up a ChildWidget.
Notice that the ChildWidget is set to be translucent, frameless and a window type. With that particular combination, it basically "hovers" over its parent and is transparent to mouse events too. And the result is that you can still interact with the underlying "Click parent" button even though the ChildWidget covers entire ParentWidget. That is the desired behavior.
Then click the "Cause the problem" button. It will create a QOpenGLWidget and immediately delete it. But the problem is that you can no longer interact with "Click parent" button anymore. Even though the QOpenGLWidget is as good as never existed, the mouse event handling is permanently messed up.
I install an event filter for debugging too. So before QOpenGLWidget was created, the mouse events are delivered to QPushButton. But after the construction and destruction, ChildWidget intercepts the mouse events. That explains why the "Click parent" button is no longer working. But I don't know why creating and deleting a QOpenGLWidget can cause that.
The problem does not occur if it is a plain QWidget instead of a QOpenGLWidget. That means it is something specific to QOpenGLWidget rather than generic event handling.
Attachments
Issue Links
- relates to
-
QTBUG-134743 QOpenGLWidget seems to mess up z-ordering of widgets in certain circumstance
-
- Reported
-