[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] SIP generated module crashes on initialization
From: Иван Андрианов <payableondeath90 () gmail ! com>
Date: 2012-01-24 8:48:06
Message-ID: CAGg9KKG8Ewx8WZMBb1tp0_t4_sYDGv1=ae1R6ses-Pti2X5RFg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hello.
I tried to generate bindings for my own library and found something that
looks like a bug in SIP. Here is a small example.
///// testsip.h /////
#ifndef TESTSIP_H
#define TESTSIP_H
#include <QObject>
#ifdef testsip_EXPORTS
#define TESTSIP_API __declspec(dllexport)
#else
#define TESTSIP_API __declspec(dllimport)
#endif
class TESTSIP_API TestObject : public QObject
{
Q_OBJECT
public:
TestObject() {}
};
class TESTSIP_API TestObject2 : public TestObject
{
Q_OBJECT
public:
TestObject2() {}
};
#endif
///// testsip.sip /////
%Module testsip
%Import PyQt4/QtCore/QtCoremod.sip
class TestObject : QObject
{
%TypeHeaderCode
#include <testsip.h>
%End
public:
TestObject();
};
class TestObject2 : TestObject
{
%TypeHeaderCode
#include <testsip.h>
%End
public:
TestObject2();
};
'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.
PS: I use sip 4.13.1, PyQt 4.9, Python 3.2, MS VC++ 2008.
Thanks in advance, Ivan.
[Attachment #5 (text/html)]
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>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic