Results 1 to 7 of 7

Thread: Display System Drives in Specific Order in QTreeView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Display System Drives in Specific Order in QTreeView

    Since you want to change the order of the drives only, obviously just using a proxy that sorts *everything* will not work. You need to subclass it and reimplement the comparision method taking into consideration *what* you are sorting. And I have no idea why you used QStandardItemModel instead of QFileSystemModel in the last snippet. Maybe that's why it "didn't work" (whatever that means)
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:


Similar Threads

  1. Replies: 8
    Last Post: 7th May 2012, 23:51
  2. Changing QTableView column display order
    By scarleton in forum Qt Programming
    Replies: 3
    Last Post: 18th October 2010, 00:04
  3. display order of subwindows in mdi area
    By eric_vi in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2010, 16:05
  4. QTreeView: get current sort column and order
    By supergillis in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2008, 17:25
  5. Changing the order of columns in QTreeView
    By johnny_sparx in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 00:00

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.