Hello.<br><br>I tried to generate bindings for my own library and found something that looks like a bug in SIP. Here is a small example.<br><br>///// testsip.h /////<br>#ifndef TESTSIP_H<br>#define TESTSIP_H<br><br>#include <QObject><br>
<br>#ifdef testsip_EXPORTS<br> #define TESTSIP_API __declspec(dllexport)<br>#else<br> #define TESTSIP_API __declspec(dllimport)<br>#endif<br><br>class TESTSIP_API TestObject : public QObject<br>{<br> Q_OBJECT<br><br>
public:<br> TestObject() {}<br>};<br><br>class TESTSIP_API TestObject2 : public TestObject<br>{<br> Q_OBJECT<br><br>public:<br> TestObject2() {}<br>};<br><br>#endif<br><br>///// testsip.sip /////<br>%Module testsip<br>
%Import PyQt4/QtCore/QtCoremod.sip<br><br>class TestObject : QObject<br>{<br>%TypeHeaderCode<br>#include <testsip.h><br>%End<br><br>public:<br> TestObject();<br>};<br><br>class TestObject2 : TestObject<br>{<br>%TypeHeaderCode<br>
#include <testsip.h><br>%End<br><br>public:<br> TestObject2();<br>};<br><br>'import
testsip' gives me a crash. If I comment subclassing from QObject and
add a private copy constructor (to eliminate a compilation error) in
testsip.sip it works fine.<br>
<br>PS: I use sip 4.13.1, PyQt 4.9, Python 3.2, MS VC++ 2008.<br><br>Thanks in advance, Ivan.<br><br>