I want to just show the display area.

To do that, I have tried the override the QGraphicsItemGroup::boundingRect(). However, nothing have happened. And i find this in QT docs, maybe this is the reason why doesn't work.

The boundingRect() function of QGraphicsItemGroup returns the bounding rectangle of all items in the item group.

Also, i know i can change the size of QGraphicsView to make it work. However i put the View as CentralWidget, as i also need to display other object in the View, i can not change the size of the View.

How can i set the display range of a QGraphicItemGroup?