Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to sort a QListView using a QSortFilterProxyModel on Qt 4.8?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gherico063
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      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.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved