Thanks for the link. Once I finally got back to this issue, it sent me in the right direction. What I ended up doing was:
in the class constructor:
setFlag(QGrpahicsItem::itemSendsGeometryChanges);
setFlag(QGraphicsItem::itemSendsScenePositionChanges);
setFlag(QGrpahicsItem::itemSendsGeometryChanges);
To copy to clipboard, switch view to plain text mode
in the overlaoded itemChange(GraphicsItemChange change, const QVariant &value) function:
{
//update position in database
}
if ((change == QGraphicsItem::ItemScenePositionHasChanged || change == QGraphicsItem::ItemTransformHasChanged || change == QGraphicsItem::ItemPositionHasChanged) && scene())
{
//update position in database
}
To copy to clipboard, switch view to plain text mode
Bookmarks