Thank you Johannes,
Now I've found another problem, when I want to set the cursor in a line "line" and in a column "index", I've just tried, to do the following:
//Moves the cursor to the beginning of the document
editor
->textCursor
().
setPosition(0,
QTextCursor::MoveAnchor);
//Now moves the cursor to the line "line" and in the column "index"
QTextEdit * editor;
//Moves the cursor to the beginning of the document
editor->textCursor().setPosition(0,QTextCursor::MoveAnchor);
//Now moves the cursor to the line "line" and in the column "index"
editor->textCursor().movePosition(QTextCursor::Down, QTextCursor::MoveAnchor,line-1);
editor->textCursor().movePosition(QTextCursor::NextCharacter, QTextCursor::MoveAnchor, index);
To copy to clipboard, switch view to plain text mode
However, everything I get is the cursor at the same position as the one before the execution of this code.
I suppose I'm doing it in a bad way. But if you or any can help me, it could be awesome
Thank you!
Bookmarks