This line of code will select the current row
r = self.tbl_anggota.currentRow()
If you know your columns (ie. it's not dynamic) you can then pull the value of each of your cells by doing this:
field1 = self.tbl_anggota.item(r,0).text()
field2 = self.tbl_anggota.item(r,1).text()
In this case, the 0
and the 1
in the item call are your columns, in a 0 indexed array. Remember that hidden columns still count.
To do this automatically when a row is clicked, you'll want to use the signal itemClicked