QGraphicsView
inherits from QAbstractScrollArea
, and viewport()
returns widget managed by scroll area, which is usually bigger than the actual scroll area widget (reason for using scroll area in the first place).
Correct size of the visible area is the size of QGraphicsView
(calling the inner widget viewport is little misleading).