def get_word_under_cursor_legacy(self):
        """
        Returns the document word under cursor ( Using Qt legacy "QTextCursor.WordUnderCursor" ).

        :return: Word under cursor.
        :rtype: QString
        """

        cursor = self.textCursor()
        cursor.select(QTextCursor.WordUnderCursor)
        return cursor.selectedText()
def get_word_under_cursor_legacy ( self ) : cursor = self . textCursor ( ) cursor . select ( QTextCursor . WordUnderCursor ) return cursor . selectedText ( )
Returns the document word under cursor ( Using Qt legacy "QTextCursor.WordUnderCursor" ).

        :return: Word under cursor.
        :rtype: QString