From 7e92b8171138438d12d8310d2fc19ce7c943394d Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sat, 12 Oct 2024 11:01:32 -0500 Subject: [PATCH] remove stylesheet on sliderLabel (#254) --- src/superqt/sliders/_labeled.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)