QPainter width and height
Asked Answered
S

1

6

Is there any chance to find out the size of the QPainter? I am using QPainter for drawing the whole graphic interface for a mobile app. The problem is that certain application overlay the window with menu which size is different for every device, thus making things nearly impossible! Are there any possibilities to do it instead of knowing QPainter size?

EDIT: simple width() and height() works!

Sporozoite answered 3/8, 2011 at 13:20 Comment(0)
M
10

You have to look at the size of the QPaintDevice attached to the QPainter

painter->device()->width();
Marroquin answered 3/8, 2011 at 13:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.