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

QSlider Stylesheet Borders Affect Only The First QSlider & are offset

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.6.3
    • 4.6.1, 4.6.2
    • Widgets: Style Sheets
    • None
    • Tested in Qt Designer on Ubuntu 9.04, Qt Verison 4.6.1
      Tested in Qt Designer on Windows 7, Qt Version 4.6.2

      There are two parts to this bug in how QSlider styles its borders.

      The attached BugAboutSliderStylesheetsExample.ui covers both of them.
      Bug Part 1: When styled with a stylesheet, the borders on QSlider::sub-page:vertical and QSlider::add-page:vertical only show on the first instance of a QSlider - if there is more than one QSlider, the borders don't show.
      To replicate, open the attached example. All stylesheet info is in the top level "Frame" stylesheet. Note that when you open the file, only one of the two otherwise identical QSliders have a border.
      One way to reproduce this:
      1. Preview the file. Note that only the left QSlider has a border.
      2. Delete the left QSlider.
      3. Preview the file. Note that the right QSlider has a border now.
      Another way to reproduce this:
      1. Open the file.
      2. Drag & Drop a new QSlider in. Note that it doesn't have a border.

      Bug Part 2: When the border does show, the sub-page border box is bigger than the add-page border box.
      If you have a "QSlider::groove:vertical

      { right: 10px; }

      " (the included example does), you can see the full gray box and see that it is wider than the green box.
      If you comment out that line, you'll see that it gets cut off on the right edge - you'll only see one pixel of the right border, even though it's specified to be 2 pixels.

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

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            aaronpowers Aaron Powers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes