Skip to content

Commit

Permalink
remove stylesheet on sliderLabel (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Oct 12, 2024
1 parent ac4adf5 commit 7e92b81
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/superqt/sliders/_labeled.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7e92b81

Please sign in to comment.