Jun-06-2022, 09:22 PM
The table is sized down by the number of rows.
If you click on an empty space below it is no longer the table.
The function is therefore only effective if a line within the table is clicked.
If you want the name use column 1
If you click on an empty space below it is no longer the table.
The function is therefore only effective if a line within the table is clicked.
If you want the name use column 1
def getCellText(self): if self.InventoryDisplay.selectedIndexes(): model= self.InventoryDisplay.model() row = self.selectedRow() column = 1 name = model.data(model.index(row, column)) self.sbar.showMessage(str(name)) print(name)