def delete_lines ( self ) : cursor = self . textCursor ( ) self . __select_text_under_cursor_blocks ( cursor ) cursor . removeSelectedText ( ) cursor . deleteChar ( ) return True
python3 select all text in a text document and delete text
Deletes the document lines under cursor .
def delete_lines(self):
        """
        Deletes the document lines under cursor.

        :return: Method success.
        :rtype: bool
        """

        cursor = self.textCursor()
        self.__select_text_under_cursor_blocks(cursor)
        cursor.removeSelectedText()
        cursor.deleteChar()
        return True