[PyQt] Quick question concerning protected member functions

Christophe Diericx christophe.diericx at natuurpunt.be
Tue Feb 17 10:02:49 GMT 2009

Ok, thanks a lot for this extremely fast and concise answer (and for
your great work on PyQT). 

For the moment i haven't had any real "showstopper" needs for these
protected member functions but it's nice to know why they behave the way
they do.



-----Oorspronkelijk bericht-----
Van: Phil Thompson [mailto:phil at riverbankcomputing.com] 
Verzonden: dinsdag 17 februari 2009 10:50
Aan: Christophe Diericx
CC: pyqt at riverbankcomputing.com
Onderwerp: Re: [PyQt] Quick question concerning protected member

On Tue, 17 Feb 2009 10:44:01 +0100, "Christophe Diericx"
<christophe.diericx at natuurpunt.be> wrote:
> Hello all,
> I have posted a simple code example concerning my question here:
> http://paste.pocoo.org/show/104256/.
> It fails with a "RuntimeError: no access to protected functions or 
> signals for objects not created from Python".
> I understand that this is in the documentation
> (http://riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#acces
> s-
> to-protected-member-functions) and that this could probably solved in 
> this specific case by buiding a QLineEdit from Python and inserting it

> into the QComboBox with setLineEdit().
> But still, I was wondering:
> * Does this happen with every C++ protected function /emitting of 
> signals or just in "some" cases?

All cases.

> * Is this scheduled to be possible in some future version of the 
> bindings or are there some intricate difficulties involved?

It's not possible without abusing C++. Those abuses may or may not be


More information about the PyQt mailing list