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

    • Commits:
      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. 5.12.2.png
          5.12.2.png
          14 kB
        2. image-2018-12-28-08-45-20-924.png
          image-2018-12-28-08-45-20-924.png
          4 kB
        3. menu-check-missing.zip
          4 kB
        4. menu-cocoa-check-visible.png
          menu-cocoa-check-visible.png
          4 kB
        5. menu-fusion-check-visible.png
          menu-fusion-check-visible.png
          5 kB
        6. menu-qss-check-missing.png
          menu-qss-check-missing.png
          4 kB
        7. menu-qss-check-patched.png
          menu-qss-check-patched.png
          4 kB
        8. menu-windows-check-visible.png
          menu-windows-check-visible.png
          4 kB
        9. Qt5.9.2.png
          Qt5.9.2.png
          15 kB
        10. WindowsStyle.png
          WindowsStyle.png
          11 kB

          Issue Links

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

            Activity

              People

              Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              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