문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top