[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Invalid protected on QItemDelegate ?
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2007-12-21 18:33:52
Message-ID: 200712211833.52744.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Friday 21 December 2007, Peter Shinners wrote:
> 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.

It's protected in QItemDelegate (which is what you mentioned in the subject). 
So what is the type of self.__real?

It would be easier if you provied some code - preferably a small, complete 
example.

> Or better than all this; is there an easier way to override the cell
> painting of a QTreeWidgetItem?

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic