[PyQt] Invalid protected on QItemDelegate ?

Peter Shinners pshinners at blizzard.com
Fri Dec 21 18:05:45 GMT 2007


I am creating a custom QAbstractItemDelegate. It mostly acts as a proxy
for standard QTreeWidget delegate. I cannot call the editorEvent()
method on the original delegate because of this.
 
    return self.__real.editorEvent(event, model, option, index)
RuntimeError: no access to protected functions or signals for objects
not created from Python
 
The documentation states the editorEvent is a public method, so I'm
surprised to see this. Without calling the correct delegate the checkbox
clicking action for QTreeWidgetItems is not processed.
 
 
Or better than all this; is there an easier way to override the cell
painting of a QTreeWidgetItem?
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20071221/3e15cb04/attachment.html


More information about the PyQt mailing list