christina123y (18th March 2009)
Now i counter another problem, the class which inherit from QGraphicsItem can't be moved and seletable.
and i have setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable)
in it's constructor,but it still can move.(i also try to put setFlags of this item in any possible postion, but it still can't be moved)
but i also add a ellipse item in the scene, howerver,the ellipse item can move.
Why? I don't understand why this happen to this item?
Wish anyone's help soonly !Thank you!
Are you overriding some events of the item you inherited from graphicsitem ?
If yes, are you calling the base class QGraphicsItem methods from there ?
Hi,
I have very similar problem regarding this subject.
I have a QGraphicsView and QGraphicsScene and some QGraphicsItem (as usual). For again to zoom upan a rubberband action I needed to reimplement mouse move event in QGraphicsView. Moreover, I also want to change the color of the item whenever mouse moves on the item. So it seemed I need to reimplement the mouse move event also in the QGraphicsItem. But I doesn't work. I also tried out eventFilter thing.
Can anyone help me?
Thanks in advance.
Bookmarks