Marnix
12th April 2010, 11:31
Hello,
I'm new in Qt and working on a project that uses QtGraphicsScene. I'm using Qt4.6.
I create a new QGraphicsRectItem with a QGraphicsItem as it parent.
When I then move the QGraphicsRectItem with moveBy or setRotation the parent still gets the old position of the QGraphicsRectItem. I've set the mouse to change shape when I hover over QGraphicsRectItem and it changes shape on the new and on the old position. When I ignore a mouse event in QGraphicsRectItem on the new position the parent does not get the mouse event. The parent but still receives events when i click on the old position.
I've enabled the ItemIsMovable, ItemIsSelectable, ItemSendsGeometryChanges, ItemSendsScenePositionChanges flags.
Is there something else i should do?
Thanks in advance.
Marnix
I'm new in Qt and working on a project that uses QtGraphicsScene. I'm using Qt4.6.
I create a new QGraphicsRectItem with a QGraphicsItem as it parent.
When I then move the QGraphicsRectItem with moveBy or setRotation the parent still gets the old position of the QGraphicsRectItem. I've set the mouse to change shape when I hover over QGraphicsRectItem and it changes shape on the new and on the old position. When I ignore a mouse event in QGraphicsRectItem on the new position the parent does not get the mouse event. The parent but still receives events when i click on the old position.
I've enabled the ItemIsMovable, ItemIsSelectable, ItemSendsGeometryChanges, ItemSendsScenePositionChanges flags.
Is there something else i should do?
Thanks in advance.
Marnix