student
student

Reputation: 1646

Get row in a qtablewidget from a qpoint object in pyqt4

Suppose I have a QTableWidget in pyqt4 and a QPoint object. How can I get the row in my table which corresponds to the coordinates in my QPoint object?

Upvotes: 0

Views: 1349

Answers (1)

Pavel Strakhov
Pavel Strakhov

Reputation: 40502

Use QTableView::rowAt function.

row = table.rowAt(point.y())

Upvotes: 2

Related Questions