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

RE-OPENED - Broken QSpinBox size calculation when using stylesheet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 5.2.0
    • 5.14.0, 5.15.2
    • Widgets: Style Sheets
    • None
    • Windows 10 64 Bit
    • Windows
    • afce2b528ce30e19af618b077e3f184cf290fa81 2614347ab8aa0ec0b1ea8f383ae795cfdb6ae2ac (qt/qtbase/5.15)

    Description

      I'm repopening this bug as it seems it still happens in latest 5.14

      A QSpinBox/QDoubleSpinbox has a different (smaller) size as soon as we set a stylesheet on one of its parents.

      This is verified with windowsvista and fusion styles

      I attached a very simple .ui in order to reproduce this

       

       

       

      ------  old issue for reference: ------------------------------------------------------------- 

      https://bugreports.qt.io/browse/QTBUG-31602

      Qt 5.1.0 RC1 has a serious bug that affects height calculation of QSpinBoxes if stylesheets are used. The attached image Qt5.1.0-rc1-20130606.png shows this issue (vertical size policy used for spin boxes in this gui: fixed) - the spin box height is too small for the content and text clipping occurs.

      The picture Qt5.0.2-20130606.png shows the same application compiled with Qt 5.0.2. Also with Qt 4.8.4 and older version this problem does not exist. So it is a new bug related to Qt 5.1.0 RC1.

      The last picture Qt5.10-rc1-20130606.png shows the application if the stylesheet file has been removed. The spin boxex look o.k. with the default Windows style - so the issue seems to be related to the stylesheet style.

      Other widgets, like i.e. QLineEdit to not show this issue so to summarize the issue is related to:

      • QSpinBox
      • stylesheet style
      • Qt 5.1.0 RC 1 (qt-windows-opensource-5.1.0-rc1-mingw48_opengl-x86-offline-2013-06-02-48.exe)

      The bug is quite serious because it affects all spin boxes in our application and makes Qt 5.1.0 unusable for us.

      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
              julienmaille Julien Maille
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes