[Qt-interest] How make multi-column ListView with row type icon and status icon in status column?

Ed Sutton edsutton at gmail.com
Thu Jul 30 18:51:04 CEST 2009


Which Qt widget(s) could meet the following requirements:

- Can display a device type icon on left-side of columns 0
- Can display a pass or fail status icon on right-side of column 2

For example:

Device Type | Location | Status Message
-------------------------------------------------------
<iconDeviceTypeA.png> DeviceA | Rack1 | Good <iconGreen.png>
<iconDeviceTypeA.png> DeviceA | Rack2 | Failure - No response <iconRed.png>
<iconDeviceTypeB.png> DeviceB | Rack3 | Warning - Over
temperature<iconYellow.png>

I am having trouble getting oriented with QListViews, QTreeViews, models,
and such.

I currently have a QTreeView prototype derived the example
/itemviews/simpletreemodel.
The prototype polls and displays device status information retrieved via
SNMP and the QTreeView consumes data formatted as a a hierarchical xml doc.
I am having trouble discovering how to place icons in desired column or as
an alternative changing cell background color to indicate status.  Should I
be using a different type of list view widget?

Thanks in advance for any tips or direction,

-Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090730/3840faa5/attachment.html 


More information about the Qt-interest-old mailing list