PDA

View Full Version : displaying data



willief
8th March 2011, 19:17
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.

franz
8th March 2011, 19:23
Sounds like a job for QAbstractTableModel and QTableView.

schnitzel
8th March 2011, 19:27
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.

willief
8th March 2011, 19:32
Thanks, I'll look into these :)

franz
10th March 2011, 06:33
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.