Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello dear friends :)
Anybody knows how to get the width of a string in pixels ? I know we have to use QFontMetrics but I don't know how. I would be grateful if somebody can help me.
Thanks
Something like
@ QFont font = someFontWeWantToUse; QFontMetrics metrics(font); qreal textWidth = metrics.width(myText);@
thank you for having answered so quickly. :)
In fact it was easy ^^
have a good day!