Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, January 2007
qt4 treeview and colorbar


Message 1 in thread

Dear All,

i'd like to use QTreeView to display a color which is specified at some
other place in the program.
The thing is that i'd like to have it nicely done, which means
that i'd like to have a box surrounded by black line and this must be
just a bit smaller than the actual size of one QTreeView line is. Of
course when
user changes the window size, the box must be changed appropriately.

If I use model to pass QColor data with role==Qt::BackgroundRole, it
does what's expected but this is not what I want. I've been looking whether
it is not by chance implemented in designer, but so far i didn't find
any widget where you can directly change the color (in the attribute
window), so I suppose it doesn't exist.

How this can be done?

thx
david


--
 [ signature omitted ]