Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.1, 5.12.0 Alpha
-
None
Description
While scrolling in a native UIScrollView, the whole Qt application seems to be blocked.
Scrolling switches the iOS run loop to a different mode, which actually seems to be handled in QEventDispatcherCoreFoundation when looking at the source code (see comment in https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/kernel/qeventdispatcher_cf.mm?h=5.12#n62). But when starting a scroll, all animations, timers etc stop.
This is easy to test: open the emoji keyboard from e.g. a QML TextInput and start scrolling - all animations and timers in QML will stop.
This is problematic when trying to add native behavior to Qt apps, like adding a WebView or UIListView to a QML application.
Example code:
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.12 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") PropertyAnimation on color { from: "#80ff80" to: "#8080ff" loops: Animation.Infinite duration: 2000 easing.type: Easing.SineCurve } TextInput { width: parent.width anchors.centerIn: parent font.pointSize: 32 text: "Text input" } }
Open the keyboard, go to emojis and start scrolling. The animation will stop in the meantime because the whole Qt application stops.