Results 1 to 2 of 2

Thread: Custom Dir View - Folders first, with improved Sort Functions

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Posts
    34
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Custom Dir View - Folders first, with improved Sort Functions

    All you need is to create your own model. Are you acquainted with Model/View architecture? The documentation is exhaustive. Here's online doc.: http://doc.qt.nokia.com/4.6/model-vi...w-architecture

    The Qt class QAbstractItemModel is where to start.

    Keep your data in a separate structure. Derive your own model that will provide the translation of data from the data storage to the view. Then join the view and the data storage through that model. Qt is very friendly in these tasks!

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

    Threepwood (20th March 2011)

Similar Threads

  1. Custom Model? Custom View? Custom Delegate?
    By Doug Broadwell in forum Newbie
    Replies: 4
    Last Post: 11th February 2010, 20:23
  2. dataChanged does not re-sort the view
    By alex9099 in forum Qt Programming
    Replies: 2
    Last Post: 5th October 2008, 20:14
  3. QTreeWidget (Row Check, Custom Sort)
    By AaronMK in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2008, 15:55
  4. Custom sort with QTableWidget
    By nicolas44 in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2007, 00:47
  5. Drag and drop items in view to sort order
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 19:43

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.