'Find first occurrence: scan whole document'

def __find_first(self, text):

    flags = (QTextDocument.FindCaseSensitively | QTextDocument.FindWholeWords)
    cursor = self.textCursor()
    cursor.movePosition(QTextCursor.Start)
    regexp = QRegExp(('\\b%s\\b' % QRegExp.escape(text)), Qt.CaseSensitive)
    cursor = self.document().find(regexp, cursor, flags)
    self.__find_first_pos = cursor.position()
    return cursor
