class MainApp(qtw.QMainWindow): def __init__(self): qtw.QMainWindow.__init__(self) self.ui = Ui_app() self.ui.setupUi(self) self.show() #event self.ui.buttonShow.clicked.connect(self.loadData) self.ui.buttonDelete.clicked.connect(self.deleteData) self.ui.buttonStart.clicked.connect(self.openStartData) self.ui.buttonKill.clicked.connect(self.openKill) #self.ui.buttonStart.clicked.connect(self.) #SHOW DATA def loadData(self): msg = "listapp" client.send(bytes(msg,"utf-8")) data = client.recv(2048) data = data.decode('utf-8') # Convert decoded data into list data = eval(data) num = len(data) #setting Rowcount self.ui.listView1.setRowCount(num - 2) temp = [] for i in range(2, num): temp.append(data[i].split()) for i in range(0, len(temp)): for j in range(0, 3): # ROW 3: Name ID Threads self.ui.listView1.setItem(i, j, qtw.QTableWidgetItem(temp[i][j])) for currentQTableWidgetItem in self.ui.listView1.selectedItems(): print(currentQTableWidgetItem.row(), currentQTableWidgetItem.column(), currentQTableWidgetItem.text()) #DELETE DATA