[solved] Which mouse button caused the mousePressEvent in a graphics scene?
-
Hello
I'm wondering how to tell which mouse button caused the mousePressEvent in the graphics scene, as both seems to call the event?the event function is as follows:
@void gItem::mousePressEvent (QGraphicsSceneMouseEvent *event)@
Thank you! Best regards
Richard -
"QGraphicsSceneMouseEvent::buttons":http://doc.qt.nokia.com/latest/qgraphicsscenemouseevent.html#buttons
bq. Returns the combination of mouse buttons that were pressed at the time the event was sent
-
You should check the "event":http://doc.qt.nokia.com/4.7/qgraphicsscenemouseevent.html#buttons
[quote]Qt::MouseButtons QGraphicsSceneMouseEvent::buttons () const
Returns the combination of mouse buttons that were pressed at the time the event was sent.
See also button() and modifiers().[/quote]