[Solved]QModelIndex get data
General and Desktop
3
Posts
2
Posters
4.5k
Views
1
Watching
-
Hi all
I have a QListView with its model set with QSqlQueryModel object.
The QSqlQueryModel contains a table with two columns (id and name), the QListView is set to show the name
I have connected the QListView with the signal clicked(), the slot receives a QModelIndex object. How do I get the id from the QSqlQueryModel from the QModelIndex ?
Thanks
DarkRoast