Results 1 to 4 of 4

Thread: QTreeWidget (Row Check, Custom Sort)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Posts
    14
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    5

    Default Re: QTreeWidget (Row Check, Custom Sort)

    Thank you again for your assistance.

    To achieve what you want you will have to sort on each IP byte.
    The QHostAddress::toIPv4Address () method worked well for this.

    After briefly looking at your code, it seems to me that it is not easy to extended it in the direction you want.
    ...
    Bottom line is that in a long run you'd be better if you use a QTreeView + some model.
    Our model in the actual application is pretty deeply entrenched with a shipping date for the next release very near. However, this suggestion pops up so often with QTreeWidget related questions. Moving to Qt's official data model will be a serious consideration for the next release.

    Code with a couple of suggestions implemented attached for reference.
    Attached Files Attached Files

Similar Threads

  1. Custom sort with QTableWidget
    By nicolas44 in forum Qt Programming
    Replies: 1
    Last Post: 9th August 2007, 00:47

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.