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

Stylesheet on QMessageBox does not show unless DontUseNativeDialog option specified

    XMLWordPrintable

Details

    • macOS

    Description

      With Qt 6 (.?) QMessageBox on macOS is by default shown as a native cocoa message box. If user code has specified a stylesheet to apply to a QMessageBox, the stylesheet will not be applied because the OS window manager is rendering the message box - and has no concept of a stylesheet for a message box.

      If a user has specified a stylesheet, that stylesheet should show, thus, the dialog should be rendered as a non-native dialog in that case.

      Another (IMHO less optimal) option is that a warning message should be printed telling the user that the stylesheet is not shown due to native message box, and QMessageBox documentation should indicate that stylesheets require the DontUseNativeDialog option.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            kkyzivat Keith Kyzivat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes