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

Adding stylesheet to QSpinBox causes a frame to be drawn to the value part

    XMLWordPrintable

Details

    • macOS

    Description

       

      Adding a style sheet like this causes a frame to be drawn around the value in QSpinBox, see screenshots.

      QSpinBox::up-button, QSpinBox::down-button {width: 18px;}
      

       

      From customer:

      "Have a look at the attached test app. This displays a QSpinBox with the
      following stylesheet set:

      QSpinBox::up-button, QSpinBox::down-button {width: 18px;}

      Build it against Qt 5.11.2. You'll see that the spinbox gets an extra frame
      around the text control (see screenshot).

      Now build it against Qt 5.10.1 (a 5.10 build I happened to have around, I
      suspect any of them will work). The spinbox background is white (see other
      screenshot).

      "Why does this matter?" I hear you cry. The answer is that we have a
      custom spinbox in our app, of which the paddle width is merely one aspect of a
      complex style. We noticed this spurious frame when we switched to Qt 5.11
      Through trial and error I've determined that it is the width that's causing
      it.

      I have a feeling this regression might be caused by the recent changes to
      qmacstyle_mac.mm to remove HITheme (specifically perhaps some frame-related
      ones in 0c974c0? ). I haven't had chance to experiment with reverting these
      changes to see if the problem goes away, however."

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              izero Tero Siironen
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes