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

Context QMenu without parent blocked by modal dialog on macOS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.15.2
    • Fix Version/s: 6.0.1, 6.1.0 Alpha
    • Labels:
      None
    • Environment:
      Compiled with 10.15 SDK, running on 10.16 BigSur
    • Platform/s:
      macOS
    • Commits:
      ae3594436b9b0540ef94379a73bf8fec8d3b7465 (qt/qtbase/dev) 46aae17ac1a4d3612aea487f37b747f32e772408 (qt/qtbase/6.0) 0b0e43bc408921295cce0dd12d6943c19eadad4c (qt/qtbase/5.15)

      Description

      Any widget/frame/menu opened from sub-dialog doesn't work on BigSur MacOS. The whole widget is not accessible and clicking everywhere producing a sound like when clicking on blocked parent dialog.

      Simple use case:

      1) Dialog derived from QDialog
      2) open self as a child dialog:

        TestDialog dlg(this);
        dlg.exec();
      

      3) create simple context menu and try to click on any item:

      QMenu contextMenu;
      	contextMenu.addAction("act1");
      	contextMenu.addAction("act2");
      
      	QAction* pSelectedAction = contextMenu.exec(QCursor::pos());
      	if (pSelectedAction)
      	{
      		QString strTxt = pSelectedAction->text();
          QMessageBox::information(this, "clicked", strTxt);
      	}
      

      I created a quick test based on TabWidget sample project. Simply click on "btnSubDialog" and then "test" buttons. This will show you the context menu which is not working

      When creating a context menu directly from the first dialog, everything works ok.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              ludek.vodicka Ludek Vodicka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes