[PyQt] New vs new signals - signatures
phil at riverbankcomputing.com
Fri Jun 29 08:52:00 BST 2012
On Fri, 29 Jun 2012 17:22:51 +1000, John Floyd <jfloyd at bigpond.net.au>
> The question relates to the signatures used to connect overloaded
> What do you use for signature in the new signals. I have tried using
> arguments that are specified in the old method but does not work.
> Eg an example from pyqwt
> old method
> self.picker.connect(self.picker, SIGNAL('selected(const QwtPolygon&)'),
> have tried
> with no success.
Define "no success".
> the user docs does suggest "A type is either a Python type object or a
> that is the name of a C++ type"
> In this regard I have notices that in the code generated from the sip
> the pyqt4QtSignal defintion is
> This is particularly confusing where for mappedtypes from a template
> c++ variable is QArray<QwtDoublePoint> which is in the c++ signature
> the python 'equivalent' is QwtQArrayQwtDoublePoint.
> Clarification would be very useful. At the moment I am not sure if
> is a
> coding problem (mine or at the sip end) or just my ignorance.
They should be interchangeable. In the current of PyQt a bound signal has
a "signal" attribute that is the corresponding C++ signal so you can check
what signature is actually being used.
More information about the PyQt