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. QFileSystemModel custom sorting
Forum Updated to NodeBB v4.3 + New Features

QFileSystemModel custom sorting

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 423 Views
  • 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.
  • L Offline
    L Offline
    Laurent Schall
    wrote on last edited by
    #1

    I am looking for a way to implement a custom sorting for QFileSystemModel which would not be only alphabetical. f.e. display first folder that are starting with a capital letter in alphabetical order and then display folder that are stating with a lower case letter in alphabetical order.

    AAA
    AAB
    BBB
    aaa
    abb
    bbb

    JonBJ 1 Reply Last reply
    0
    • L Laurent Schall

      I am looking for a way to implement a custom sorting for QFileSystemModel which would not be only alphabetical. f.e. display first folder that are starting with a capital letter in alphabetical order and then display folder that are stating with a lower case letter in alphabetical order.

      AAA
      AAB
      BBB
      aaa
      abb
      bbb

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Laurent-Schall
      I assume by interposing a QSortFilterProxyModel, e.g. as per start out from https://stackoverflow.com/a/20715646/489865 ?

      1 Reply Last reply
      2
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        See also here: https://forum.qt.io/topic/110227

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        2

        • Login

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