[PyQt] QTableView as pick list

Kernc kerncece at gmail.com
Wed Dec 2 11:44:01 GMT 2015


Ah, sorry, it's:

    self.arrivals_view.model().index(model_index.row(), 2).data()

Obviously, since the index() method accepts an int row and int col, and the
QModelIndex instance provides a row() method that returns just that.

Get friendly with your documentation. ;-)

http://doc.qt.io/qt-5/qabstractitemmodel.html#index
http://doc.qt.io/qt-5/qmodelindex.html#row
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20151202/d5562cad/attachment.html>


More information about the PyQt mailing list