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!

p.i.g.
  • 2,815
  • 2
  • 24
  • 41
Blackie123
  • 1,271
  • 4
  • 16
  • 22

1 Answers1

10

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

painter->device()->width();
Alessandro Pezzato
  • 8,603
  • 5
  • 45
  • 63