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

Can't define CSS with properties for QToolButton with Qt 6

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11
    • Commits:
      cb27ed30f7 (qt/qtbase/dev) c6e23c19d0 (qt/qtbase/6.2) c6e23c19d0 (qt/tqtc-qtbase/6.2) cb27ed30f7 (qt/tqtc-qtbase/dev) 9741fbd31e (qt/qtbase/6.3)

      Description

      The following CSS does not work with Qt 6, but works with Qt 5 on a QToolButton where popupMode is set to MenuButtonPopup.

      CSS:

      QToolButton[popupMode="1"] {
       padding-right: 20px;
      }

      According to https://doc.qt.io/qt-6/qtoolbutton.html - QToolButton::MenuButtonPopup is 1.

      The UI file shows the property is QToolButton::MenuButtonPopup for "popupMode".

      This is what the button looks like:

      Qt 6:

      Qt 5:

       

        Attachments

        1. image-2022-01-08-02-54-37-520.png
          image-2022-01-08-02-54-37-520.png
          2 kB
        2. image-2022-01-08-02-55-09-798.png
          image-2022-01-08-02-55-09-798.png
          2 kB
        3. main.cpp
          0.7 kB
        4. QTBUG-99642-fusion.png
          QTBUG-99642-fusion.png
          14 kB
        5. QTBUG-99642-macstyle.png
          QTBUG-99642-macstyle.png
          14 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            vhilshei Volker Hilsheimer
            Reporter:
            jonaski Jonas Kvinge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: