Results 1 to 14 of 14

Thread: how to sort a list by one of its items ?! [solved]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2010
    Posts
    18
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question how to sort a list by one of its items ?! [solved]

    Hey Guys

    I got this :
    Qt Code:
    1. struct wordItem {
    2. QString word;
    3. int count;
    4. };
    5.  
    6. QList <wordItem> list;
    To copy to clipboard, switch view to plain text mode 

    now I want to know what is the fastest way to sort the list by wordItem.count ?!
    Is there any function in Qt or C++ to do this for me ?!

    Thank you for your time
    Last edited by gbmtoday; 2nd January 2011 at 20:38.

Similar Threads

  1. Replies: 1
    Last Post: 29th November 2010, 17:22
  2. Comparing Items In List Box
    By kenny_isles in forum Qt Programming
    Replies: 9
    Last Post: 21st February 2007, 13:06
  3. Items in QListView should sort on Header Click
    By vinnu in forum Qt Programming
    Replies: 14
    Last Post: 10th November 2006, 12:49
  4. delete items from list box
    By vvbkumar in forum Qt Programming
    Replies: 4
    Last Post: 23rd June 2006, 19:08
  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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.