开发者

event handler in QML through QWidget class

开发者 https://www.devze.com 2023-01-25 18:02 出处:网络
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

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

精彩评论

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