I would like to delete objects from my layout and I dont know how I should do this.
- Code: Select all
list_label = 
count = len(list_label) -1
if self.lineEdit_combobox_api.currentText() == 'New Data':
text, _ = QInputDialog.getText(self, 'Input Dialog',
'Enter data name:')
self.new_line_label = QLabel(text)
t = [x for x in self.list_label]
self.line_edit_layout_datasource.addWidget(x) <--------------------Adding objects to my layout
if self.lineEdit_combobox_api.currentText() == 'Delete Data':
I can delete my list but I also wanna delete the objects in my layout. Have someone an Idea?
Thanks in advance