Since QSortFilterProxyModel can be set data, what will happen if
Code:
for( qint32 i = 0; i < 5; i++) { for( qint32 j = 0; j < 5; j++) { } } tableView->setModel(proxyModel); tableView->setSortingEnabled(true);
Printable View
Since QSortFilterProxyModel can be set data, what will happen if
Code:
for( qint32 i = 0; i < 5; i++) { for( qint32 j = 0; j < 5; j++) { } } tableView->setModel(proxyModel); tableView->setSortingEnabled(true);
I guess nothing will appear on view...
If you have tried it, you can tell us the answer :P
of course it wont show anything, first of all, your index would always be invalid like this, secondly, even if setData is called, it would be called of QAbstractItemModel!!
no use of this whole code..
yes. then i tried to insert rows and columns to the proxy model and called setData(), some items appears and some does not, and there're repeat ones, i think that is because i set the proxy model sort dynamically, and set data to exiting items. anyway, source model is easier to handle, especially use a QStandardItemModel.
I think that's because you are using the proxy in a way it was not meant to be used. Attach a source model to it.