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

[macOS] QMessageBox doesn't look native

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5
    • 5.9.7, 5.10.1, 5.11.3, 5.12.0, 5.12.1
    • None
    • 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)

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              crystalidea Steven (crystalidea)
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes