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

Stylesheet Margin/Padding squashes QSpinBox

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.2, 6.9.0 Beta2, 6.10.0 FF
    • 6.8.1, 6.9.0 Beta1
    • Widgets: Style Sheets
    • None
    • macOS 15.2 / latest Qt dev branch
    • All
    • b2cc8824e (dev), e23933e86 (6.9), 75fd0f3ba (6.8)

    Description

      Since commit 96adebed606cdbc73c73778917d777dc04c6e93e, setting a margin or padding (or both) on a QSpinBox using a stylesheet squishes the spinbox.

      See the "broken" (using current dev branch) and "working" (current dev branch with the commit reverted) screenshots that are attached below. I also added a trivial reproducer which adds some margin and padding using a stylesheet, this seems to happen with all QSpinBoxes that have stylesheets applied.

       

      For reference, we observe this in OBS Studio when using updated Qt (e.g. obsproject/obs-studio#11649).

      Attachments

        1. broken.png
          broken.png
          13 kB
        2. Spinbox-QTBUG-Sample.zip
          47 kB
        3. working.png
          working.png
          14 kB

        Issue Links

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

          Activity

            People

              chehrlic Christian Ehrlicher
              sebastianbeckmann Sebastian Beckmann
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes