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

Stylesheet on QMessageBox does not show unless DontUseNativeDialog option specified

XMLWordPrintable

    • macOS

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes