Android-Only Bug in QTextEdit and QPlainTextEdit Qt 5.3.2 | Qt 5.4 RC1

  • Hi all,

    Ok, I think I found a show stopper that only seems to exist in Qt for Android.

    Basically I am using a QTextEdit (I also tested it with QPlainTextEdit) and I have noticed that the Left-Arrow key on the virtual keyboard that pops up does not move the cursor/caret to the previous position.

    I have tried to work-around the problem by sub-classing the QTextEdit (or QPlainTextEdit) and handling the keyPressEvent and detecting the left arrow key press but the cursor still does not move.

    I need to have this have this fixed so I cannot release the product with this bug.

    Please fix this ASAP. It exists in Qt 5.3.2 and I just tried Qt 5.4 RC1 and the issue is still there.

    Below I have #included a sample of how I tried to work-around the issue but to no avail.

    Am I doing something wrong?

    @void MyTextEdit::keyReleaseEvent(QKeyEvent *e)

    if (e->key() == Qt::Key_Left)
        QTextCursor tc = this->textCursor();
        tc.setPosition(tc.position() - 1, QTextCursor::MoveAnchor);
    emit this->keyRelease(e);


    I have also tried:

    @tc.movePosition(QTextCursor::Left, QTextCursor::MoveAnchor);@

    But no fix. I am out of ideas. Please assist with any work arounds.

Log in to reply