Results 1 to 2 of 2

Thread: Column with numbers

  1. #1
    Join Date
    Sep 2006
    Location
    Rio de Janeiro, Brazil
    Posts
    44
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Column with numbers

    Hello,

    I am with the following problem:

    In the QTable, QDataTable and QListView when we order to command a column that this filled with numbers, it command as if he was string is there thus: 1, 5, 6, 201, 20, 40, 500... and thus goes.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Column with numbers

    Reimplement QListViewItem::compare() (or simmilar) so that it sorts the column according to numerical values.

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

    ederbs (29th November 2006)

Similar Threads

  1. QTableWidget stretch a column other than the last one
    By roleroz in forum Qt Programming
    Replies: 6
    Last Post: 4th February 2015, 07:35
  2. Replies: 0
    Last Post: 10th November 2006, 14:46
  3. QTable column stretchable with minimum Width
    By sunil.thaha in forum Qt Programming
    Replies: 0
    Last Post: 24th April 2006, 14:17
  4. hidden QListView column suddenly visible
    By edb in forum Qt Programming
    Replies: 10
    Last Post: 27th January 2006, 09:00
  5. How to dispay an icon in the first column of QTreeView
    By yogeshm02 in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2006, 16:51

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.