Hi,
I would like to delete selected item from QListView, but I don't know how to get current index. I have code:
Qt Code:
QStringList list; list << "1" << "2" << "3" << "4" << "5"; model->setStringList(list); listView->setModel(model);To copy to clipboard, switch view to plain text mode
So, what is the simpliest way to do this? Thanks in advance.


Reply With Quote

I chose QListView because I want to display only one column from table, but maybe it was more easy to use QSqlTableModel and hide columns.

Bookmarks