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

QMenu action's checked status isn't shown if an icon is also present

    XMLWordPrintable

Details

    • 0736e050cb0f82ca445e954e1db631f1dd1de473 (qt/qtbase/5.12)

    Description

      If I create a QMenu with a QAction that is both checked (setCheckable(true)) and has an icon (setIcon(icon)), then render it using a custom stylesheet, the checked status isn't shown.

      I've attached a project that demonstrates the problem (tested using Qt 5.6.3 and 5.9.2). If I disable the stylesheet, the checked indicator (either a checkmark or a border/background) correctly appears for the Cocoa, Fusion, and Windows styles. But when I enable a custom stylesheet, no checked indicator shows. Screenshots attached.

      Attachments

        1. menu-check-missing.zip
          4 kB
          Steve Mokris
        2. menu-cocoa-check-visible.png
          4 kB
          Steve Mokris
        3. menu-fusion-check-visible.png
          5 kB
          Steve Mokris
        4. menu-windows-check-visible.png
          4 kB
          Steve Mokris
        5. menu-qss-check-missing.png
          4 kB
          Steve Mokris
        6. menu-qss-check-patched.png
          4 kB
          Steve Mokris
        7. image-2018-12-28-08-45-20-924.png
          4 kB
          Nick D'Ademo
        8. Qt5.9.2.png
          15 kB
          Uwe Kindler
        9. 5.12.2.png
          14 kB
          Uwe Kindler
        10. WindowsStyle.png
          11 kB
          Uwe Kindler

        Issue Links

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

          Activity

            People

              tpochep Timur Pocheptsov
              smokris Steve Mokris
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes