I am new to QT 4.0.  I have a QGraphicsItem subclass which I need to
constrain its positioning when it is dragged on the screen by the mouse.
 For example, if another of these objects is visible on the screen, I want
to be sure the x coordinate of the new one is always >= to the old.  Also I
want to have the option of constrained movement, where the object can only
be moved vertically, if I choose.

I do not understand where I can intercept the setting of the object's
position on the screen.  I thought I could redefined
QGraphicsItem::itemChange() and watch for ItemPositionChange and HasChanged
-- but I never get any of these notifications.  Given that setPos() is not
overridable, where can I force limitations on my object's positioning?

Thanks.

-DS
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to