Is there any way to control the keyboard cursor in QTextEdit? For instance move the cursor one line up, or two positions back. I have looked at the QCursor class, but is this only for the mouse cursor? Thanks!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This method allows you to move the cursor in various ways, such as one word to the right or up one line.
You can use it like this:
If you need to select some text, not just move the cursor, specify the
MoveModeas KeepAnchor.