code: def _wordBeforeCursor(self):
          
          cursor = self._qpart.textCursor()
          textBeforeCursor = cursor.block().text()[:cursor.positionInBlock()]
          match = _wordAtEndRegExp.search(textBeforeCursor)
          if match:
              return match.group(0)
          else:
              return ''
docs: Get word, which is located before cursor