开发者

event handler in QML through QWidget class

I have some problem with handle QML event on touch notebook, events onPressed, onPressAndHold not work, no debug message. I trying event handle through Qt class, but i have failure (connect QML and Qt using QDeclarativeView).

How i can write global event handler whitch register QML touch event on noutbook.

Thank开发者_开发百科s.


You can use an event filter from C++. E.g. if you reimplement QApplication::notify in a QApplication subclass you should be able to hook into anything. Might be useful to check that your App works on other (mouse-based) platforms. QML's MouseArea uses Mouse Events and not touch. If your platform only uses touch events, and doesn't fake mouse events - you might need to look at the gesturearea research QML plugin; http://qt.gitorious.org/qt-labs/qml-gesturearea

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜