Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.5
Description
Context popup menus stay up when clicked in QOpenGLWindow. Popup menu disappears when clicking mouse outside QOpenGLWindow. See the attached screenshot and video. Works fine on Windows and Linux.
We use QWidget::createWindowContainer() to embed a QOpenGLWindow into a QWidget-based UI and into QMainWindow.
Popup menu created when clicking right mouse button in
MyFullQOpenGLWindow::mousePressEvent. See the attached MyFullQOpenGLWindow.cxx file. When clicking inside QOpenGLWindow then our popup menu not closed.
We logged Qt events and found that when we click inside QOpenGLWindow then we would not get MousePress event for QWidgetWindow (which is a Qt internal class). We get MousePress event for QWidgetWindow when clicking mouse outside QOpenGLWindow and then popup menu is closed. QWidgetWindow::handleMouseEvent code closes popup menu by calling QApplication::activePopupWidget() and then close() called for this active popup widget.