04-30-2013 09:02 AM
I've managed to record TouchEvents (their screen x/y, window x/y, local x/y) and their receiver and target objects. However, when I try and create a new TouchEvent and post it back to the receiver I get a Message Handler warning of:
Trying to send event unknown receiver: "Event[Touch] Time[08:53:30:841] Phase Type Screen[149,176] Window[149,176] Local[149,176]"
using the code:
... TouchEvent * te = new TouchEvent(TouchType::Type(touchType), sx, sy, wx, wy, lx, ly, visualObject); QCoreApplication::postEvent(receiverObject, te); ...
I have tried all combinations of posting - posting to the Application (bb::cascades), posting to the scene, posting to the receiver and the target itself but I always get the same error.
What am I missing to inject touch events?
Solved! Go to Solution.
04-30-2013 11:08 AM
04-30-2013 12:21 PM
QMetaObject::invokeMethod(visualObject, "touch", Q_ARG(bb::cascades::TouchEvent*,te));
This essentially fires the touch event straight to the object (ignoring the receiver for now - I might try and hook that up) but right now the propogation of using postEvent (i.e. the proper way that seems to work on QT4 with Hooq etc) doesn't seem to work with Cascades.