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

[macOS] QMessageBox doesn't look native

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.7, 5.10.1, 5.11.3, 5.12.0, 5.12.1
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      QMessageBox does not look like a native NSAlert dialog on Mac OS X.

      • QMessageBox displays close/minimise/zoom widgets in the title bar, but a modal dialog should not have these widgets (not even in a disabled state).
      • QMessageBox packs the window contents too tightly compared to the standard NSAlert layout convention.
      • QMessageBox makes the buttons too small compared to the standard NSAlert button widths.
      • QMessageBox does not display the application icon
      • and much more

      Related (but closed because Qt4 is no longer supported): QTBUG-4949 QTBUG-9481

      Possible idea of implementation (mine): https://github.com/kleuter/qcocoamessagebox

      Comparison screenshots are attached.

      QMessageBox::information(nullptr, "Error", "This is the error message");

      vs

      QCocoaMessageBox::information(nullptr, "Error", "This is the error message");

        Attachments

        1. QCocoaMessageBox.png
          160 kB
          Steven (crystalidea)
        2. QMessageBox.png
          139 kB
          Steven (crystalidea)
        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:
              crystalidea Steven (crystalidea)
            • Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes