Hey thanks for this fast answer!
the size of my QGraphicsview get changed if you change the window size. How can i deal with this?
And if I use your settings you can still move an item through the border. Is there an easy way to fix this?
Greets
Hey thanks for this fast answer!
the size of my QGraphicsview get changed if you change the window size. How can i deal with this?
And if I use your settings you can still move an item through the border. Is there an easy way to fix this?
Greets
You will probably have to implement a handler for QGraphicsItem::itemChange(). The example code at the doc link does almost exactly what you need in the case where the item is about to move across a forbidden boundary. Also look at the Qt "elasticnodes" example.
Bookmarks