Pyside2 / PyQt5 Extract Data From QFormLayout
How to extract data from PySide2/PyQt5 layout
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: select = tableview.selectionModel() selected = select.selectedRows() if selected: print(selected[0].row()) but that does it well: selected = select.hasSelection()