qavaxb
17th January 2013, 23:24
Hi,
I'm using QSqlTableModel to interact with sqlite database. I have connected QSortFilterProxyModel to filter results in QTableView.
Now I'm wondering how can I add two and more virtual columns that I don't have in model, but I want to have in view.
I have read the topic: http://www.qtcentre.org/threads/8070-QAbstractProxyModel-and-quot-virtual-quot-columns and http://www.qtcentre.org/threads/15654-QAbstractProxyModel-adding-a-virtual-column but it adds only one of column.
Which and how should I reimplement QSortFilterProxyModel to add more than one column? More precise, how is realized passing information about position in QTableView to model?
Thanks in advance for every hint.
I'm using QSqlTableModel to interact with sqlite database. I have connected QSortFilterProxyModel to filter results in QTableView.
Now I'm wondering how can I add two and more virtual columns that I don't have in model, but I want to have in view.
I have read the topic: http://www.qtcentre.org/threads/8070-QAbstractProxyModel-and-quot-virtual-quot-columns and http://www.qtcentre.org/threads/15654-QAbstractProxyModel-adding-a-virtual-column but it adds only one of column.
Which and how should I reimplement QSortFilterProxyModel to add more than one column? More precise, how is realized passing information about position in QTableView to model?
Thanks in advance for every hint.