I'm still a beginner and I can't figure this out from the documentations on my own :(<div><br></div><div>I am using QSqlTableModel to access a table called "project". </div><div><br></div><div><div>projectModel = QSqlTableModel()</div>
<div>projectModel.setTable("project")</div><div>projectModel.select()</div></div><div><br></div><div>In projectModel, column(0) are the ID, column(1) are the names. QListView is set to show column 1</div><div><br>
</div><div>projectView.setModelColumn(1)</div><div><br></div><div>Now when I click an item, I want to retrieve the ID on column(0) of the selected item. Can anyone point me to some example how I can do this, please?</div>
<div><br></div><div>Any help appreciate, thanks.</div>