Qt-jambi-interest Archive, February 2008
QGraphicsItem.GraphicsItemFlag.ItemIsMovable --- any signals on this one ?
Message 1 in thread
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 ?
-=Børge
Message 2 in thread
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