Results 1 to 5 of 5

Thread: displaying data

  1. #1
    Join Date
    Feb 2011
    Posts
    12
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default displaying data

    I'm attempting to build a GUI application for displaying data that updates periodically, and I'm at the point where I need to decide how I'm going to display my data. They're just numbers, and what is really important is whether I can see if the data is out of a certain range. So I'm thinking a grid view, where the background of the number can either be green or red, representing whether or not it is in the clear or out of it's range. Any opinions on what the best QT tool for this would be? I made a lot of rows and columns of QLCDNumbers but I realized I'd have to hard code each piece of data retrieved to each QLCD, and this is a lot of data. Any ideas?

    Really appreciate it.

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: displaying data

    Sounds like a job for QAbstractTableModel and QTableView.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

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

    willief (8th March 2011)

  4. #3
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: displaying data

    I can suggest QTableWidget. In my app, I need to display different parameters that update periodically. I used a two column QTableWidget, the left column shows what the parameter is and the right column its value.

  5. The following user says thank you to schnitzel for this useful post:

    willief (8th March 2011)

  6. #4
    Join Date
    Feb 2011
    Posts
    12
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: displaying data

    Thanks, I'll look into these

  7. #5
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: displaying data

    Note that QTableWidget is essentially QTableView and a QAbstractTableModel derivative combined. The model/view approach will give you much cleaner code due to less coupling.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Displaying YUV data through Phonon
    By heminm in forum Qt Programming
    Replies: 0
    Last Post: 10th October 2009, 16:16
  2. Problem in displaying RGB32 data
    By bmn in forum Qt Programming
    Replies: 2
    Last Post: 16th June 2008, 14:30
  3. Displaying data in QTable
    By raghvendramisra in forum Qt Tools
    Replies: 1
    Last Post: 6th September 2007, 12:48
  4. Replies: 3
    Last Post: 17th May 2007, 13:50

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.