Hello and happy new year to all

I have an application (qwidget based, no qml in that part) which makes heavy use of QtConcurrent::mapped(). Whenever the user touches the screen (or clicks on the mouse for the PC version), the QFuture is cancelled to be restarted later (a bit more complicated than that but that's the principle). This is running fine on Android, Windows, Linux, Mac/OS, but on iOS the touch event is triggered only after the QFuture finishes. Even worst, if the user finishes the gesture before the QFuture is finished, the touchbegin and touchupdate are delivered after a while but the touchend event is never triggered. So I end up in a situation where I don't have any finger on the device and QApplication::buttons() still reports leftButton. I have to touch the screen once to get it back to normal.

I have tried to put some QCoreApplication::flush() and some QApplication::processEvents() in some critical places such as resultReadyAt() etc, but qt still only receives the initial touch event (converted to a mousePress or not) only after the QFuture is finished, which can take several seconds.

My feeling is that the CPU is too busy to deliver the touch event even if it's supposed to run on another thread, and even if processEvents is called.

The very same application runs fine on Android, without any processevents or flush.

Any idea how I can force qt to treat touch events asap in that case and keep the application responsive?

Thanks
Philippe Lelong
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to