set QToolButton Icons with qss image
-
I don't see where you use image-position anywhere in your qss.
-
@ggrr said in set QToolButton Icons with qss image:
but when i delete the "border:none" it will not show image
More or less described in the documentation:
"Warning: If you only set a background-color on a QToolButton, the background will not appear unless you set the border property to some value. This is because, by default, the QToolButton draws a native border which completely overlaps the background-color."
-
-
@Christian-Ehrlicher sorry my english is not good.
i mean, i just tried qss like below ,and it worked without "border:" property
QToolButton{
background-color:red;
} -
Then this is maybe (base) style dependent - if the base style allows the override of the color then it works, otherwise it won't.
-
@Christian-Ehrlicher
"This Property" not mean "image:" ??there is a "period" behind "image-position"
-
If you think so - then use
background-image