Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Android-Only Bug in QTextEdit and QPlainTextEdit Qt 5.3.2 | Qt 5.4 RC1
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 478 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rwxc
    wrote on last edited by
    #1

    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)
    {
    QTextEdit::keyReleaseEvent(e);

    if (e->key() == Qt::Key_Left)
    {
        QTextCursor tc = this->textCursor();
    
        tc.setPosition(tc.position() - 1, QTextCursor::MoveAnchor);
    
        this->setTextCursor(tc);
    }    
    
    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved