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

Modal QMessage always displays a zoom button on macOS (regression 5.9.3 -> 5.10.0)

    XMLWordPrintable

Details

    • macOS
    • f0b8d90402a0ec27b465dbcfa626f5176e167ece

    Description

      On macOS with Qt 5.10.0, a QMessage dialog always displays the green zoom button - even if you explicitly tells it not to display such button. For modal alerts this is a really bad user experience as it makes no sense to zoom a small alert to take the full screen. Attached is a sample project 'QMessageBoxBug' to reproduce the issue.

       

      When compiling the sources with Qt 5.9.3, you will see such an alert on macOS 10.13.2:

      If you compile the source code with Qt 5.10.0, you will see an alert with the green zoom button:

       

      The complete project source code is attached QMessageBoxBug.zip and the bug can be reproduced with 5 lines of code:

      QMessageBox* messageBox = new QMessageBox("My App", "Text", QMessageBox::Question, QMessageBox::Yes | QMessageBox::Default, QMessageBox::NoButton, QMessageBox::NoButton);
      messageBox->setInformativeText("Informative text");
      messageBox->setButtonText(QMessageBox::Yes, "OK");
      messageBox->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
      messageBox->exec();

      Steps de reproduce:

      1. Download the attached QMessageBoxBug project or copy the 5 lines of code in any project
      2. Compile on macOS 10.13.2 using Qt 5.10.0
      3. Run the application

      Result: The QMessageBox alert has a green zoom button.

      Expected result: The QMessageBox alert should not have a green zoom button

       

      Notes:

      • This issue is not reproducible with Qt 5.9.3
      • So far I did not find any workaround
      • Also note that the close and minimize button are disabled but visible with Qt 5.10.0. With Qt 5.9.3 they don't appear at all as expected.

      Attachments

        1. Qt5.9.3.png
          Qt5.9.3.png
          61 kB
        2. Qt5.10.png
          Qt5.10.png
          57 kB
        3. QMessageBoxBug.zip
          3 kB

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              jirauser46068 user-e3f1a (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes