[Qt-interest] Custom delegate only for certain items

Arnold Krille arnold at arnoldarts.de
Thu Jun 11 23:47:40 CEST 2009


On Thursday 11 June 2009 23:20:35 RZ wrote:
> My QTreeView got 2 columns, many rows - items in the second column are
> not editable for the user. Items in column 0 are editable - but only
> items in the third hierarchy level shall use the custom delegate.
> If i got everything correctly each block of items is on the same row (so
> setItemDelegateForRow won't help) and they are in the same column (so
> setItemdelegateForColumn doesn't help).
> Has someone got an idea how to solve that?

Maybe you have to derive your delegate from the standard delegates and decide 
wether to use your own delegate on the modelindex given. Third level means the 
grandparents parent is invalid. ;-)

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/20090611/d26ecb4c/attachment.bin 


More information about the Qt-interest-old mailing list