[PyQt] Quick question concerning protected member functions

Phil Thompson phil at riverbankcomputing.com
Tue Feb 17 09:50:25 GMT 2009

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#access-
> 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 safe.


More information about the PyQt mailing list