[PyQt] PyQt shadowing virtual slots?

Phil Thompson phil at riverbankcomputing.com
Fri Aug 8 16:13:23 BST 2008

On Fri, 8 Aug 2008 16:25:06 +0200, "Arve Knudsen" <arve.knudsen at gmail.com>
> I encountered a strange problem when wrapping a custom QDialog
> subclass. This subclass implements accept and connects it to
> QDialogButtonBox::accepted, but this would not get invoked and I could
> not for the life of me understand why. Eventually I discovered that
> the reason was that I did not declare accept among the class' methods
> in the SIP wrapper. Why is it that C++ reimplementations of slots are
> hidden if they are not also wrapped in the SIP equivalent?? See
> attached demo (test.py is the main script).

In order to void recursive calls to virtuals the generated code explicitly
specifies the scope, so if it doesn't know about it it can't call it.


More information about the PyQt mailing list