[PyQt] SIP_ANYSLOT vs SIP_SLOT vs SIP_SLOT_CON()
sable at users.sourceforge.net
Fri Sep 13 09:07:38 BST 2013
2013/9/10 Phil Thompson <phil at riverbankcomputing.com>
> That doesn't sound like a great design...
I agree but it is not my call. It may change when the code gets migrated to Qt5.
> SIP_SLOT just checks that the argument has been created by QtCore.SLOT(),
> ie. that it is a string that begins with the magic character. Plenty of
> examples in PyQt4.
Thanks for the explanations.
So I decided to start simple and go for SIP_SLOT for the moment. The
sip code I have looks like the following:
void connect(const int eventType, QObject *, SIP_SLOT member);
sipCpp->connect(a0, a1, a2);
The Python code looks like this:
self.cloud = Foo.Bar.PointsCloud()
def onCloudErased(self, args):
In the end it works but I can't pass Python callables directly.
To have that, I would need to know the signature for the signal to
pass it to sipConnectRx, but I cannot get that.
More information about the PyQt