Question

How to get the font metrics of a QPainter outside paintEvent drawing method? I would need this before painting on the screen.

Was it helpful?

Solution

If you need to do text layout outside of your paint event, just create a QFontMetrics from the font you will be using.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top