[PyQt] New vs new signals - signatures
John Floyd
jfloyd at bigpond.net.au
Fri Jun 29 08:22:51 BST 2012
The question relates to the signatures used to connect overloaded signals.
What do you use for signature in the new signals. I have tried using the same
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&)'),
self.slotter)
have tried
self.picker.selected[QwtPolygon].connect(self.slotter)
and
self.picker.selected['QwtPolygon'].connect(self.slotter)
with no success.
the user docs does suggest "A type is either a Python type object or a string
that is the name of a C++ type"
In this regard I have notices that in the code generated from the sip files,
the pyqt4QtSignal defintion is
selected(QwtPolygon)
This is particularly confusing where for mappedtypes from a template where the
c++ variable is QArray<QwtDoublePoint> which is in the c++ signature whilst
the python 'equivalent' is QwtQArrayQwtDoublePoint.
Clarification would be very useful. At the moment I am not sure if there is a
coding problem (mine or at the sip end) or just my ignorance.
Cheers
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120629/b658140f/attachment.html>
More information about the PyQt
mailing list