-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9
The following code shows all the problems I've found so far:
QWidget w2; auto pal = qApp->palette(); pal.setBrush(QPalette::Window, Qt::green); auto lay = new QHBoxLayout(&w2); for (auto orientation : { Qt::Horizontal, Qt::Vertical }) { for (auto tickPos : { QSlider::NoTicks, QSlider::TicksBothSides , QSlider::TicksAbove, QSlider::TicksBelow }) { auto s = new QSlider(orientation); s->setTickPosition(tickPos); s->setAutoFillBackground(true); s->setPalette(pal); lay->addWidget(s); } } w2.show();
This results in the following output:
While this looks not that bad, there are several problems better visible when using QT_SCALE_FACTOR=3:
- the handle is cutted off on the left with QT_SCALE_FACTOR=1
- the groove is too long in the left with QT_SCALE_FACTOR=3
- the groove is not centered when no tickmarks are shown with QT_SCALE_FACTOR=3
- the tickmarks are not fully visible
- the handle is drawn in different sizes, the drawing does not fully comply with the style as the style does not draw an inner circle with controlStrokeSecondary
- the groove has a small outline with frameColorLight which is also not compliant to the style:
For Gerrit Dashboard: QTBUG-140649 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
680104,3 | Windows11Style: Fix QSlider painting | dev | qt/qtbase | Status: NEW | 0 | 0 |