iOS Trackpad not moving the cursor



  • Hello!

    On iPhone and iPad is a trackpad function. 3D touch the keyboard on iPhone and touch it with two fingers on iPad to enable it. It enables you to move the cursor in a trackpad fashion on the text editor. Here is an article describing how it works, now to the problem:

    I couldn't make it work on QML's TextEdit or TextArea yet. I also tried it in "Qt Quick Controls 2 - Gallery". It works in every native app, but not in Qt-based. I tried it on Qt 5.8.

    Listening to Qt.inputMethod events I see that the cursor is moved, but x and y is not changing:

    Connections{
        target: Qt.inputMethod
        onCursorRectangleChanged: {
            console.log("cursor rectangle: " + Qt.inputMethod.cursorRectangle)
        }
    

    The method is triggered continuously as long as I move my finger in trackpad mode, but coordinates remain static most of the time. When I play around a little more and press harder in between I can get the cursor jump to the beginning of the line or beginning of a word, but that's all. It's mostly useless compared to the native experience.

    Is this a bug or is there anything I can do? Maybe use a native UITextField? I can't find any resources from Apple on this. It looks like a default built-in feature.


  • Qt Champions 2016

    @EduardMe just learned something new - wasn't aware of this iOS feature. (Using iPhone and iPad only to test apps on and not for daily work)

    I had a similar issue on BlackBerry Android Device with a physical keyboard, but this keyboard is also touchable and you can move the cursor. These gestures from physical kapazative keyboard works with native android apps but not in my QtQuickControls2 Apps. I created a Bug: https://bugreports.qt.io/browse/QTBUG-51165

    Please open a bug for iOS and perhaps refer to this Android bug



  • Thanks for the info. I have filed a bug and referred to your bug: https://bugreports.qt.io/browse/QTBUG-59403


  • Qt Champions 2016

    @EduardMe said in iOS Trackpad not moving the cursor:

    Thanks for the info. I have filed a bug and referred to your bug: https://bugreports.qt.io/browse/QTBUG-59403

    thanks. I just tested again with Qt 5.8 and gestures from capazative keyboard (Android) still not recognized by Qt apps as native apps do.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.