Reputation: 12743
table = QtGui.QTableView()
table.setSelectionModel(QtGui.QItemSelectionModel.Rows)
returns a TypeError: QTableView.setSelectionModel(QItemSelectionModel): argument 1 has une
xpected type 'SelectionFlag'
error.
What is the right way to set the selection model for the QTableView
widget?
Upvotes: 0
Views: 910
Reputation: 29886
If you want to change what gets selected when you activate a cell, you have to use:
table.setSelectionBehavior(QtGui.QTableView.SelectRows)
Upvotes: 3