QPainter.drawText() - where painter finished drawing text
-
wrote on 3 Apr 2020, 16:55 last edited by
Can you somehow determine the area where the drawText function painted the text?
I need to know (coordinates) where the painter finished painting the text. -
Hi,
You can pass the exact rectangle where you want your text written. Isn't it enough for your purpose ?
-
wrote on 3 Apr 2020, 19:27 last edited by
No, text can have many fonts and sizes.
Is there any way to calculate pixel text width? -
@BartoszT said in QPainter.drawText() - where painter finished drawing text:
Is there any way to calculate pixel text width?
Seee QFontMetrics
-
wrote on 3 Apr 2020, 22:18 last edited by
Thanks, it works.
2/5