[PyQt] TreeView and its itemDelegate

Albert Cervera i Areny albert at nan-tic.com
Fri May 29 15:19:32 BST 2009


A Divendres, 29 de maig de 2009, Ben De Luca va escriure:
> Hi List,
>
> I am implimenting a treeview and I wanted the editor that I use to
> change tree names to show the name, rather than being blank.  When I
> look at the tree view it is using a QtGui.QStyledItemDelegate so I
> subclass that with a completely empty function and then set it as my
> trees item delegate. When I do this though I notice that none of the
> items show up in the view any longer.
>
>
> My questions are,
>                   Are the delegates used for displaying data normally
> or only when they are about to be edited?
>
>        if they are shown in the 'normal' view how do you specify when
> one is an edit or not.
>                   What does a tree view really use as its delegate?

I don't know if I understood you correctly, but It seems you might be looking 
for this: 

http://doc.trolltech.com/4.5/qitemeditorfactory.html

>
>
>
> -bd
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt


-- 
Albert Cervera i Areny
http://www.NaN-tic.com
Mòbil: 669 40 40 18


More information about the PyQt mailing list