def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def _on_item_button_remove_clicked(self, button, item):
    self.remove_item(item)