Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
6.8.3
-
None
-
Ubuntu 24.04 x64
Visual Studio Code 1.100.0
PyQt6-6.8.1
Description
I am using Qt with PyQt, but I think this is a general issue. I try to style a QSlider and make the handle and the groove bigger, to make them better usable on a touch ui:
...
layout = self.layout()
...
volslider = QSlider(Qt.Orientation.Horizontal)
volslider.setStyleSheet("QSlider {height: 40px;} QSlider::groove:horizontal {height: 25px;} QSlider::handle:horizontal {height: 40px; width: 40px; margin: -15px 0px;}")
layout.addWidget(volslider)
But this doesn't have any affect. But when I add a border-radius to the groove, even with a value of 0, it works:
...
layout = self.layout()
...
volslider = QSlider(Qt.Orientation.Horizontal)
volslider.setStyleSheet("QSlider {height: 40px;} QSlider::groove:horizontal {height: 25px; border-radius: 0px;} QSlider::handle:horizontal {height: 40px; width: 40px; margin: -15px 0px;}")
layout.addWidget(volslider)
This happened after an update from an older version, before I used 6.6 and this wasn't an issue.