StyleSheet - disable coloring of selected text
Solved
General and Desktop
-
Hi,
When clicking the down and up arrows on the SpinBox, the text is highlighted in blue as below:
How could I remove this effect with qstylesheet, or make it transparent?
-
@Creatorczyk
I believe that is the selected style on theQLineEdit
contained in theQSpinBox
. You might try e.g.QSpinBox { selection-background-color: transparent } QLineEdit { selection-background-color: transparent }
I have had (unresolved) trouble in the past trying to access the
QSpinBox
'sQLineEdit
via stylesheet rules => good luck! -
Not specifying
selection-color
made the text invisible for me so I had to set it to the same color ascolor
:QSpinBox { color: white; selection-background-color: transparent; selection-color: white; }
I didn't have to set any stylesheet for the
QSpinBox
'sQLineEdit
.