Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131329

Context popup menus stay up when clicked in QOpenGLWindow.

XMLWordPrintable

    • macOS
    • e4ef0f03e6f1fddc397980fd7fbf6f6b829f16d9

      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.

        1. MyFullQOpenGLWindow.cxx
          11 kB
          Anton Butsev
        2. QMenu_QOpenGLWindow_Qt655_bug.mov
          19.42 MB
          Anton Butsev
        3. QMenu_QOpenGLWindow_Qt655_bug.png
          177 kB
          Anton Butsev
        4. qt_menu_bug_simpler.zip
          3 kB
          Anton Butsev
        5. qt_qmenu_bug.zip
          31 kB
          Anton Butsev
        6. qtbug131329.zip
          3 kB
          Irfan Omair
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            anton.butsev Anton Butsev
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes