Replace text from where user left the cursor
I developed a Find/Replace feature for my editor. In case of replaceText(), the text is being replaced from the start of the document. Ideally, it should start replacing from where the user left the cursor position. Please help me regarding this.
void MyEditor::replaceText(const QString &findWord, const QString &replaceWord)
I need to start replacing text not from START of doc, but from where user had left the cursor.
 code wrappings added, koahnig
Please use "code wrappings":http://qt-project.org/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01 when posting code sections
You could work with the find() methods of the [[Doc:QTextDocument]] attached to the QTextEdit. Those methods take a [[Doc:QTextCursor]] or int argument as the starting point of the search.