You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
QLabeledRangeSlider (as well as QRangeSlider) does not work properly with parent widget background. Parent background hovers minimal handle and all the bar-range. I've tested with PyQt6.QtWidgets.QSlider, it works fine with background.
To Reproduce
Steps to reproduce the behavior:
Create PyQt application instance and main widget with layout (QVBoxLayout e.g.).
Create QRangeSlider/QLabeledRangeSlider, add values and range.
Set stylesheet for main widget with background: black;.
See that Slider does not have minimal handle and bar (for labeled Slider labels will be present, figured it out with another background color.
thanks @hrimov. yeah, I'm aware of this unfortunately (though I don't see an open issue for it, so thanks for opening!)
This is a very tricky one to try to solve. I think the best we can (and should) do is to give much better/complete documentation on how to use custom styles. It's very hard, for example, to know that that the background is black and therefor use light colored labels, so it's likely you'll need to fully customize the whole slider yourself.
That said, it's also clear that the custom stylesheet is killing the paintEvent drawing the second handle... so that's not something the end user should have to deal with, and is a definite bug in superqt.
napari/napari does use this range slider with custom stylesheets... but those sheets are rather elaborate. I'll see what I can isolate & fix. thanks
I encountered the same issue. In order to solve it, I disabled the background (using slider.setStyleSheet("background:none;")) and reformatted everything that could be adjusted without causing errors. I think the bug may be related to the inheritance of QAbstractClass, which has only one slider, however, I haven't thoroughly reviewed it yet.
Describe the bug
QLabeledRangeSlider (as well as QRangeSlider) does not work properly with parent widget background. Parent background hovers minimal handle and all the bar-range. I've tested with PyQt6.QtWidgets.QSlider, it works fine with background.
To Reproduce
Steps to reproduce the behavior:
background: black;
.Example code:
Expected behavior
It was expected that the parent widget background would not affect the child widget.
Screenshots
QLabeledRangeSlider without parent widget background
QLabeledRangeSlider with parent widget background
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: