Re: [PyQt] [SIP] Segfault with nested template types

2013-07-07 Thread Casper Ti. Vector
After lost of frustrations I seem to find the correct solution: use > #define sipType_cell sipFindType("QPair") instead of > #define sipType_cell sipFindType("cell") Hope it helps anyone with similar problems in future. On Sat, Jul 06, 2013 at 02:04:57AM +0800, Casper Ti. Vector wrote: > test.h:

Re: [PyQt] [SIP] Segfault with nested template types

2013-07-06 Thread Casper Ti. Vector
Follow up: after replacing code of pia_test() with > Test.pia.clear(); with everything else unchanged, this issue can still be reproduced. On Sat, Jul 06, 2013 at 02:04:57AM +0800, Casper Ti. Vector wrote: > test.h: > > #include > > #include > > typedef QPair cell; > > struct test { QMap pia; };

[PyQt] [SIP] Segfault with nested template types

2013-07-05 Thread Casper Ti. Vector
test.h: > #include > #include > typedef QPair cell; > struct test { QMap pia; }; > extern test Test; > void pia_test(); test.cpp: > #include "test.h" > using namespace std; > test Test; > void pia_test() { > Test.pia[QPair(0, 0)] = QPair(0, 0); > } test.sip: > %Module test > %ModuleHeaderCode