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

[Mac] QMenu not cleaned up when displayed in a modal dialog that is then closed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.5.0
    • None
    • Macintosh OSX 10.9, 10.10
    • macOS

      The attached example demonstrates a problem in which if a QMenu is displayed due to clicking a QToolButton with a menu, and the dialog is closed while the menu is displayed, the menu is not cleaned up.

      This happens using OSX 10.9 and 10.10.

      To reproduce:
      1. Build the attached example.
      2. Click the "Run dialog" button. This opens a modal dialog that contains a QToolButton.
      3. Click on the downward arrow on the right of the QToolButton in the modal dialog. Doing so displays a menu with 2 actions.
      4. While the menu is popped, click the red button in the dialog's title bar to close the modal dialog.
      5. The QMenu is not hidden, however the parent dialog has gone away.
      6. If you click pretty much anywhere, and then look in the Application Output in Qt Creator, you'll see:

      2015-07-23 14:47:16.385 test[10573:303] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mmutz Marc Mutz
            aclight Adam Light
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes