How to sort a QListView using a QSortFilterProxyModel on Qt 4.8?



  • Im trying to create a simple File Manager on a linux system as a learning process to know Qt. It had been a week and i really cant find a sloution by my own.
    I subclassed QSortFilterProxyModel and made my own lessThan() function defined. But nothing is sorted still. The function sort() from QSortFilterProxyModel does nothing. So how could i make items on my QListView sorted using proxy model? Most examples on my documentation are using QTreeView which has its own sorting capability (w/c the QListView lacks, sigh). But i need the QListView. Can someone tell me how to do it? Or give a sample on how to reimplement sort()? thank you.


  • Moderators

    Welcome to devnet,

    Have a look at "this forum topic":http://qt-project.org/forums/viewthread/12007
    I believe it has what you are looking for.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.