I have a data model and a QListView widget. Filling widget with setModel:
self.listProjects.setModel(Model(<data_projects>))
If I need to get data from the selected row
model_index = self.listProjects.currentIndex()
project_id = model_index.data(QtCore.Qt.UserRole + 1)
So far so good, but it does not work with QComboBox
asset_index = self.comboboxAsset.currentIndex()
returns integer instead of QModelIndex… How should I retrieve data from QComboBox?