'Remove all text items.'

def clear(self):

    layout = self.layout()
    for i in reversed(range(layout.count())):
        item = layout.itemAt(i)
        item.text_item.setParentItem(None)
        if self.scene():
            self.scene().removeItem(item.text_item)
        layout.removeAt(i)
    self.label_items = []
