Results 1 to 9 of 9

Thread: Sorting column in QTreeWidget

Hybrid View

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

    Default Re: Sorting column in QTreeWidget

    Everything will be ok. Just reimplement the operator. Resorting is caused by changing the sort column, not the other way round.

    About the "tedious" argument - it is you who chose the tedious path by using QTreeWidget. The class is meant to be used for really simple cases, so basing a large application around QTreeWidget might have been a design error.

    One more thing - you can implement sorting in a tree widget subclass yourself if you want. Just create a sorting slot and connect it to the header using signals.
    Last edited by wysota; 14th November 2007 at 18:07.

Similar Threads

  1. Sorting in QTreeWidget
    By adhit in forum Qt Programming
    Replies: 15
    Last Post: 8th May 2007, 12:49
  2. QTreeWidget item editing: want column specificity
    By McKee in forum Qt Programming
    Replies: 12
    Last Post: 10th December 2006, 22:12
  3. Replies: 1
    Last Post: 21st September 2006, 10:37
  4. Column Sorting
    By sumsin in forum Qt Programming
    Replies: 1
    Last Post: 16th June 2006, 07:48
  5. QT4: Sorting in QTreeWidget (subclass)
    By Michiel in forum Qt Programming
    Replies: 21
    Last Post: 29th March 2006, 18:08

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.