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

Context popup menus stay up when clicked in QOpenGLWindow.

    XMLWordPrintable

Details

    • macOS

    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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes