[PyQt] Custom C++ types as signal arguments
David Boddie
davidb at met.no
Tue Oct 1 14:46:08 BST 2013
On 28 September 2013 15:31:41, I wrote:
> Thanks for the correction - it works! In fact, removing the StringList
> type altogether appears to work, which puts me back in the position I
> started in, but with working code. The typedef was originally put in as
> a workaround for the crash and because I had noticed that the emitStrings
> signal was defined in the generated C++ code with "unknown-type":
[...]
> I'll try this out again on Monday and see what, if anything, I've been
> doing differently.
Well, the test wrapper worked after the suggested modifications but the
actual code I'm working on failed. I tried later versions of sip (4.15.2)
and PyQt (4.10.3), and this time got a warning along the lines of
AttributeError: signal was not defined in the first super-class of class 'TestDialog'
It turned out to be a fairly mundane problem with not specifying exactly
the same signals and slots in the C++ code and sip definitions; something
I'm usually fairly careful with. It's useful to get this warning, however,
as it means that you can start running through the checklist of things to
check for errors.
After some refactoring of C++ code, things work as expected. :-)
David
More information about the PyQt
mailing list