title: pyqt qtextedit move cursor
body: <p>I am using Qtextedit with a search button. here is the code.</p>
  
  <pre><code> format = QTextCharFormat()
   format.setBackground(QBrush(QColor("Gray")))
   regex = QRegExp(pattern)
   if (self.ui_log.checkBox_case.isChecked()==False):
      regex.setCaseSensitivity(False)
   pos = 0
   index = regex.indexIn(self.ui_log.log_textEdit.toPlainText(), pos)
   while (index != -1):
       cursor.setPosition(index)
       cursor.movePosition(QTextCursor.EndOfWord, 1)
       cursor.mergeCharFormat(format)
        pos = index + regex.matchedLength()
        self.ui_log.log_textEdit.moveCursor(??????)
        index = regex.indexIn(self.ui_log.log_textEdit.toPlainText(), pos)
  </code></pre>
  
  <p>Qtextedit have a scrollbar as the input file i am providing in qtextedit is large..</p>
  
  <p>The searched text is high lighted, how can i move to searched text by providing index of word ?</p>