Unsolved QTextCursor no visible
-
Hi, I have a problem with QTextCursor.
After moving it in a position, I can't see it on the screen anymore.
The code that I'm using is :QTextCursor c=ui->textEdit->textCursor(); c.movePosition(c.Start); c.movePosition(QTextCursor::MoveOperation::Right); c.movePosition(QTextCursor::MoveOperation::Right); c.movePosition(QTextCursor::MoveOperation::Right); c.movePosition(QTextCursor::MoveOperation::Down); c.insertText("Ciao");
How can I set visible the cursor?
-
Hi,
What version of Qt are you using ?
In what OS ?
Can you provide a complete minimal compilable example reproducing that behaviour ? -
Hi
Answered here.https://forum.qt.io/topic/113038/move-qtextcursor
-How can I set visible the cursor?
It is visible but only when the TextEdit has focus else not so make sure you are not stealing
its focus while testing the code.