Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to use a QAbstractTableModel with a QListView
rmam last edited by
I have a table model that implements QAbstractTableModel which is used by a QTableView, and I also have another widget that includes a QListView to display content that is extracted from columns of the table model. I could add a list model that implements QAbstractListModel, but I feel that duplicates the code already used to define the table model. With that in mind, does anyone know if it's possible to reuse the table model in a list view?
Rory_1 last edited by
@rmam Perhaps you could use a QStandardItemModel for both your tableView and listView.
What kind of content would that be ?
Depending on that, a proxy model might be enough.