Laurent Crivello
Laurent Crivello

Reputation: 3931

Event when resizing QGraphicsScene

I have a QGraphicsScene and a QGraphicsView allocated to it (c++). I would like to get an event each time the QGraphicsScene is resized in order to draw an adapted pixmap size.

However I couldn't find a resize event for the QGraphicsScene (just for the QGraphicsView), and I couldn't find a pixmap capability in the QGraphicsView (just for the QGraphicsScene).

How should I proceed ? Thanks

Upvotes: 0

Views: 208

Answers (1)

Sergei Kulik
Sergei Kulik

Reputation: 343

QGraphicsScene is an abstract that represents an infinite plane with graphics elements on it. QGraphicsView is a "window" that allows you to look at particular part of the scene. Thus, your question kinda does not make sense, because you cannot "resize" an infinite plane. Instead you should operate in terms of the view.

Upvotes: 3

Related Questions