Moving the cursor in a PyQt5 text edit doesn't work
问题 I'm contributing to Frescboaldi, a PyQt5 application and experience problems interacting with the core text edit component. It seems whatever I try I can't get either of setPosition or movePosition to work. The code cursor.insertText("Hello") cursor.setPosition(cursor.position() - 5) properly inserts the text Hello in the document but leaves the cursor at the end of the inserted text (instead of moving it to the left by 5 characters). The first line proves that cursor, textedit and document