PDA

View Full Version : Mouse Event



sujan.dasmahapatra
19th February 2009, 12:31
Dear Friends
I have an GraphicsItem. I want to select it and move it only when the user presses left mouse on the item.How could I achieve this???Can anyone help me please???

jogeshwarakundi
19th February 2009, 12:36
refer to:
QGraphicsItem::setAcceptedMouseButtons ( Qt::MouseButtons buttons )
QGraphicsItem::mousePressEvent()

also refer to QGraphicsItem::GraphicsItemFlags

talk2amulya
19th February 2009, 12:40
use mousePressEvent() and check for Qt::LeftButton