[Qt-interest] QTreeView, additional images
Andre Somers
andre at familiesomers.nl
Tue Apr 26 08:31:35 CEST 2011
Op 26-4-2011 1:27, Thomas Ehrnhoefer schreef:
> Hi
>
> I have a TreeViewer, and I would like to have additional images
> available. I don't want multiple columns, just additional decorations
> (images) to (some) of the items (e.g. a "changed" indicator). An
> example would be http://oboedit.org/docs/images/tree_view_single.png
>
> Since I am new to Qt, I am wondering what the best way (if there is
> any) to do this would be. Most likely some custom drawing I assume,
> but I am unsure on how/where to start.
>
> Any hints are very welcome
You can do custom drawing using a delegate, but you could also think
about combining your images into a single image to be used for
decoration before drawing. If you cache these combinations, it would not
even need to be slow.
André
More information about the Qt-interest-old
mailing list