QLabel, set text size help
-
Hi, I want to set text size in my QLabel. But here is the problem. When i use setPointSize, size 9 is too small and size 10 is too big. Same problem with setPixelSize. Do you have any other idea, how set point size to 9,5 or similar?
-
DerManu: Thanks for tip, do you know any font, that can fit ? I havent found it yet.
Rahul Das: I tried this too, but there is no difference between 9,5 and 10.
Any other idea? Exist some function, that can take the label like picture or something, and resize it like 90% or 110% from original size?
-
Hi Andell,
try to use HTML tags. Examples :
@
QLabel("<span style="font-size:9.5em; ">kdkdk hhyy</span>");
@
or
@
QLabel("<span style="font-size:9.5ex; ">gdgdg</span>");
@
or
@
QLabel("<span style="font-size:5%; ">ldldl</span>");
@
or
@
QLabel("<span style="font-size:small; ">ldldl</span>");
// and use : xx-small , x-small, small, medium, large, x-large, xx-large
@