find string width
-
how to find QString widthor change QString Width
-
-
Vronin, I want change the size like hello world,HELLO WORLD
-
-
Vronin not convert to uppercase ,width of string
example:
font:times new romen
size:12 or 15 or 20 -
@Rameshguru said in find string width:
Vronin not convert to uppercase ,width of string
example:
font:times new romen
size:12 or 15 or 20Then this has nothing to do with QString: QString is only a container for a string. It knows nothing about how to render the contained data. How are you displaying your "hello world"?
-
The only thing QString can do is hope you use it in a rich text widget. see bottom of page 11 of http://www.bogotobogo.com/cplusplus/files/c-gui-programming-with-qt-4-2ndedition.pdf
-
@Rameshguru
Hi,Qstring is just a container class, i think you wanted to change the widget text size, for that you can change the size of text using setstylesheet() method. by using this method you can change font family and size or else you can use setFont() method.