How do i add The value of the Silder over the Handle of the QSlider?
Unsolved
General and Desktop
-
Hi,
Your slider doesn't look native, what platform are you on ?
In any case, there's no way to do it in Designer. You'll likely have to do some custom painting.
-
it is the native slider with some stylesheet work
stylesheet of the Sliderbelow
QSlider::groove:horizontal { border: 1px solid #bbb; background: white; height: 10px; } QSlider::sub-page:horizontal { background:rgb(0, 0, 0) ; background: ; border: 1px solid #777; height: 10px; } QSlider::add-page:horizontal { background: #fff; border: 1px solid #777; height: 10px; } QSlider::handle:horizontal { background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc); border: 1px solid #777; width: 20px; } QSlider::handle:horizontal:hover { background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #fff, stop:1 #ddd); border: 1px solid #444; } QSlider::sub-page:horizontal:disabled { background: #bbb; border-color: #999; } QSlider::add-page:horizontal:disabled { background: #eee; border-color: #999; } QSlider::handle:horizontal:disabled { background: #eee; border: 1px solid #aaa; }
-
Then you should rather start from a QAbstractSlider and do the painting by hand like suggested before.