diff --git a/src/superqt/sliders/_labeled.py b/src/superqt/sliders/_labeled.py index b5cc6565..cff7279e 100644 --- a/src/superqt/sliders/_labeled.py +++ b/src/superqt/sliders/_labeled.py @@ -654,7 +654,14 @@ def __init__( slider.rangeChanged.connect(self._update_size) self.setAlignment(alignment) self.setButtonSymbols(QSpinBox.ButtonSymbols.NoButtons) - self.setStyleSheet("background:transparent; border: 0;") + + le = self.lineEdit() + # make the lineedit transparent + palette = le.palette() + palette.setColor(palette.ColorRole.Base, Qt.GlobalColor.transparent) + le.setPalette(palette) + le.setFrame(False) # no border + if connect is not None: self.editingFinished.connect(lambda: connect(self.value())) self.editingFinished.connect(self._silent_clear_focus)