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

QMenu stylesheet has alignment issue when one item has icon/checkable

    XMLWordPrintable

Details

    • 96e9c8cc8aae718942f79ac98e775f06501b0e25 (qt/qtbase/dev) 683b673c501da1cef17b8c74e30ed74a37c7d22b (qt/tqtc-qtbase/tqtc/lts-5.15) fa2efb8b3577c69fee305c0d74f6996bbf84bd7a (qt/qtbase/6.0)

    Description

      Menu item Does not show correctly after applying the stylesheet below:

      QMenu::setStyleSheet("QMenu::item{ padding: 2px 25px 2px 28px; }");
      

      If there is one menu item with an icon or checked flag, all the item texts will not be vertically aligned. Seeing the attached screenshot and code example.

      It seems to work fine with 5.14.0 and broken after this release.

      Attachments

        1. qtbug90242.png
          qtbug90242.png
          7 kB
        2. qtbug90242.zip
          1 kB

        Issue Links

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

          Activity

            People

              vgt Eirik Aavitsland
              shmittal Shveta Mittal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes