Stylesheet of QGroupBox does not work properly
-
Hello,
I have some widgets (a 2x2 table and 2 labels) inside a QGroupBox. Everything works as expected. See Picture:
But then I want to change the color of the border. I usegroupbox.setStyleSheet("QGroupBox {border: 1px solid black;}")
Which has the wanted effect of changing the color, but it also seems to mess up some margins or paddings. See picture:
So how do i change the border color/size/radius without touching the other parameters?
And how do i change the title size without touching anything else?
Or what are the parameters i need to change with that, to make it look like the first picture?Thanks in advance
-
@Moesen said in Stylesheet of QGroupBox does not work properly:
But then I want to change the color of the border.
Then why not use
border-color: black
so as not to alter anything else like the border size?Also, you may get different effects (desirable or not) via
groupbox.setStyleSheet("border-color: black;")
without theQGroupBox
?