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.
Example code:
import sys
from PyQt6 import QtWidgets, QtCore
from superqt import QLabeledRangeSlider, QRangeSlider
app = QtWidgets.QApplication([])
main_widget = QtWidgets.QWidget()
# main_widget.setStyleSheet("background: black;")
range_slider = QLabeledRangeSlider(QtCore.Qt.Orientation.Horizontal)
range_slider.setValue((15, 25))
range_slider.setRange(10, 40)
lay = QtWidgets.QVBoxLayout()
main_widget.setLayout(lay)
lay.addWidget(range_slider)
main_widget.setMinimumSize(600, 400)
main_widget.show()
sys.exit(app.exec())
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):
- macOS 12.2.1, Apple M1 chip
- PyQt6 (6.5.1)
- Python 3.10.10
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):