airglide
5th December 2012, 17:50
Hello everyone,
I've a QGraphicsView and a QGraphicsScene, within this scene are QGraphicsitems.
It sounds quiet trivial but I couldn't manage to change the "size" of the scene by dragging an item at the border of the view (->viewport() ).
I've set the size of the scene because I want that the Items are inserted where a click happens. Otherwise it would insert the first item in the middle...
I tried to override the QGraphicsItem::mouseMoveEvent function and then I tried to check if the scene intersects the item (that the item is at the border and not the whole item is shown... , the view should then add some scrollbars to it (like the default behavior) and should expand the whole thing.
thank you for your help
airglide
I've a QGraphicsView and a QGraphicsScene, within this scene are QGraphicsitems.
It sounds quiet trivial but I couldn't manage to change the "size" of the scene by dragging an item at the border of the view (->viewport() ).
I've set the size of the scene because I want that the Items are inserted where a click happens. Otherwise it would insert the first item in the middle...
I tried to override the QGraphicsItem::mouseMoveEvent function and then I tried to check if the scene intersects the item (that the item is at the border and not the whole item is shown... , the view should then add some scrollbars to it (like the default behavior) and should expand the whole thing.
thank you for your help
airglide