pyapp-kit / superqt

Missing widgets and components for Qt-python
https://pyapp-kit.github.io/superqt/
BSD 3-Clause "New" or "Revised" License
210 stars 38 forks source link

How to setStyleSheet on second handle and groove #56

Closed Gaalee closed 2 years ago

Gaalee commented 2 years ago

Hi, i'm trying to use your QLabeledRangeSlider with PySide6 but setStyleSheet doesn't work for most of the things you can edit from QSlider class.

I tried to do

self.range_slider = QLabeledRangeSlider(Qt.Horizontal)
QSS = """
   QSlider::groove:horizontal {
       border: 1px solid #999999;
       height: 8px; 
       background-color: green;
       margin: 2px 0;
   }
    QSlider::handle {
        background-color: red;
        height: 20px;
        width: 20px;
        border-radius: 10px;
   }
self.range_slider.setStyleSheet(QSS)
"""

But the only thing working is the handle being red. How can i style the second handle and the groove using the QLabeledRangeSilder widget ? Thanks.

Gaalee commented 2 years ago

Never mind its the same problem explain here #35 It work without any background-color on the frame.

tlambert03 commented 2 years ago

thanks for the comment! will close in favor of that issue