Results 1 to 10 of 10

Thread: QTableView and display of doubles

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: QTableView and display of doubles

    The model is returning a QVariant double and the default delegate is formatting that with QLocale::toString() using the 'g' format. I would suggest you tackle this with a QStyledItemDelegate attached to the view or just to the double column(s). It need not do much except implement displayText() for double columns.

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

    b1 (16th November 2011)

Similar Threads

  1. Replies: 5
    Last Post: 25th May 2011, 10:10
  2. How to display periodically updated data in QTableView
    By nickla in forum Qt Programming
    Replies: 12
    Last Post: 15th March 2011, 21:33
  3. How do I display a picture on a QTableView cell?
    By danielperaza in forum Qt Programming
    Replies: 16
    Last Post: 9th April 2010, 22:04
  4. Replies: 2
    Last Post: 7th June 2009, 10:47
  5. QTableView does not display time string correctly
    By ad5xj in forum Qt Programming
    Replies: 1
    Last Post: 5th August 2007, 20:35

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.