Turns out it was some kind of gremlins, half built project, bad dependency or something.
It scared it to work by rolling my sleeves, cleaning everything and building against my own debug build of Qt 4.7.4. I figured I trace internally what is happening, but there was no need, it started working immediately. I then went back to QtSDK version, repeated the cleaning up steps and it does continue to work. Sorry for the noise. Harri On 11/18/2011 08:18 PM, Jason H wrote: > 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 <ha...@mpaja.com> > *To:* qt-qml@qt.nokia.com > *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 > Qt-qml@qt.nokia.com <mailto:Qt-qml@qt.nokia.com> > http://lists.qt.nokia.com/mailman/listinfo/qt-qml > > _______________________________________________ Qt-qml mailing list Qt-qml@qt.nokia.com http://lists.qt.nokia.com/mailman/listinfo/qt-qml