QGraphicsItem.GraphicsItemFlag.ItemIsMovable --- any signals on this one ?

Gunnar Sletta gunnar at trolltech.com
Wed Feb 6 15:42:17 CET 2008


Børge Nygaard Austvold wrote:
> Hi,
> 
> Are there any signals in the GraphicsView framework telling weather an 
> item has been moved ? Setting the 
> QGraphicsItem.GraphicsItemFlag.ItemIsMovable flag makes it movable but 
> how do I get the new coordinates after the user has moved the item ?

There are some indirect options:

  * You could connect to QGraphicsScene.changed() which emits a list of 
scene rectangles that have changed. From these rectangles you could find 
the items that intersect and do whatever you need to do from there.

  * The items have a virtual itemChanged() event function that you can 
reimplement and this function has some ItemPosChange options that you 
can listen to.

best regards,
Gunnar



More information about the Qt-jambi-interest mailing list