[Qt-interest] QTableView and QTreeView item background

Carsten Breuer CarstenBreuerQt at textwork.de
Tue Apr 20 00:22:33 CEST 2010


Hi Andrei,

> I am playing around with a QTableView and QTreeView, each using a 
> QFileSystemModel as model. Working with views is a bit different than what 
> appears to be a straight road with QTableWidget, at least when it comes to 
> coloring the background of just some items displayed.

I see tho possibilities here:

1.) Write an Delegate and change the color there.
2.) Not sure: Use a proxy model.

> Also I am curious if it is possible to add a widget or picture inside a view 
> item?

Check out the model help.
I'm not user with this one.
Check also Qt::DecorativeRole (or something like that.


Regards,



Carsten



More information about the Qt-interest-old mailing list