I\'m using a QTableView object types. This object contains several online and I use this model:
class PaletteTableModel(QtCore.QAbstractTableModel):
def
In my case I use this action into a function that is called in doubleClicked event something like this: I add this line code into the init function
self.tableSusAmigos.doubleClicked.connect(self.doubleClicked_table)
After that I declared doubleClicked_table like this:
def doubleClicked_table(self):
index = self.tableSusAmigos.selectedIndexes()[0]
id_us = int(self.tableSusAmigos.model().data(index).toString())
print ("index : " + str(id_us))
In this case I show an id (integer) that it's in the first column (that's the reason the number 0 in selectedIndexes()[0])