[Qt-interest] Fwd: decoration role for the tree model subclass
Arnold Krille
arnold at arnoldarts.de
Wed Dec 17 02:30:58 CET 2008
On Wednesday 17 December 2008 01:19:11 ami guru wrote:
> do i have to overload the data() function for Qt::DecorationRole ?
You should already have overloaded the data function. Thereby you might have
noticed that it has an in parameter indicating the role of the data requested.
The first role you react to is Qt::DisplayRole because that is the role to
display (hence the name) your data.
But there are more roles: There is for example a role to request a decorative
icon for the item, so that role is called DecorationRole.
If you think about that mechanism and look at the roles explained at
http://doc.trolltech.com/4.4/qt.html#ItemDataRole-enum is should become pretty
clear...
Have fun,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081217/1d726876/attachment.bin
More information about the Qt-interest-old
mailing list