I think there is an interactive flag that is off by default, and then you will 
only get mouse events when a button is down. There is another flag that lets 
you get events without a button being down.



________________________________
 From: Harri Pasanen <[email protected]>
To: [email protected] 
Sent: Friday, November 18, 2011 12:42 PM
Subject: [Qt-qml] No mouse events in C++ QML element
 
Hi,

I'm trying to get mouse events in my QML plugin.

In my class inherited from QDeclarativeItem I implement the following 
virtual functions:

     void paint(QPainter *painter, const QStyleOptionGraphicsItem *, 
QWidget *widget = 0);
     void mousePressEvent(QGraphicsSceneMouseEvent *e);
     void mouseMoveEvent(QGraphicsSceneMouseEvent *e);
     void mouseReleaseEvent(QGraphicsSceneMouseEvent *e);

and the paint() is called and my widget is rendered ok.  But for some 
reason I receive no mouse events.

I'm inclined to think I'm missing something really simple, like toggling 
a flag somewhere.

Any hints what might be wrong?

Harri
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to