PyQt5 / PySide2 QTableView how to find out if row is selected and which one in Python?

Question: I have a QTableView in PyQT5 / PySide2

I want to

  • Know if a row is selected (my tableview is set to select by rows)
  • Know which row is selected

Thanks

Answer:

A bit hackishly though:

but that does it well:

  •  
  •  
  •  
  •  

Lives in Mauritius, cruising python waters for now.