Adding styles to a QSpinBox
Unsolved
General and Desktop
-
How do I make a qtspinbox look like this?
This is the best I got?
QSpinBox { border-radius: 2px; border: 1px solid rgba(72, 66, 66, 0.5); padding: 4px; } QSpinBox::up-button { subcontrol-position: top; width: 14px; height: 14px; margin-left: 8px; } QSpinBox::down-button { subcontrol-position: bottom; width: 14px; height: 14px; margin-left: 8px; }
-
To get rid of the grey +/i buttons you have to set the border and backgroundcoler for the subcontrols:
border: 0px; background-color: white;
However this will also remove the icon (arrow or +/-) on the subcontrol, so you have to set it yourself e.g.
image: url(:/images/plus_icon.png);
where plus_icon.png is an icon that you have added to the resources