[PyQt] SIP PyQT compilation issue
emmanuel_mayssat at lynceantech.com
emmanuel_mayssat at lynceantech.com
Tue Apr 5 23:50:39 BST 2011
> I assume that in C++ UserMessage is a sub-class of QObject, but you have
> lied to SIP about this. If so, then you need to tell SIP that UserMessage
> has a private copy ctor (which it normally infers from the QObject
> definition).
>
> Phil
I looked at qobject.sip
[...]
private:
QObject(const QObject &);
};
$cat UserMessage.sip
class UserMessage : QObject
{
%TypeHeaderCode
#include <UserMessage.h>
%End
public:
UserMessage();
~UserMessage();
void setup( QObject* statusMessageConsumer, // Setup the signal / slot connections required to present messages to the user
QObject* warningMessageConsumer,
QObject* errorMessageConsumer );
void setup( QObject* generalMessageConsumer ); // Setup the signal / slot connections required to present messages to the user
void sendStatusMessage( QString message ); // Send a status message to the user
void sendStatusMessage( QString message, QString source ); // Send a status message to the user including a string identifying the source of the message
void sendWarningMessage( QString message ); // Send a warning message to the user
void sendWarningMessage( QString message, QString source ); // Send a warning message to the user including a string identifying the source of the message
void sendErrorMessage( QString message ); // Send an error message to the user
void sendErrorMessage( QString message, QString source ); // Send an error message to the user including a string identifying the source of the message
signals:
void statusMessage( QString message ); // Signal a status message
void warningMessage( QString message ); // Signal a warning message
void errorMessage( QString message ); // Signal an error message
void generalMessage( QString message ); // Signal a message (emitted for status, warning, and error
private:
// copy constructor entry added as per previous email
UserMessage(const UserMessage &);
};
BUT STILL
g++ -c -pipe -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT -DNDEBUG
-DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -I. -I/home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//widgets/include
-I/home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//data/include
-I/home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//api/include
-I/home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//plugins/include -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/python2.6
-I/usr/lib64/qt4/mkspecs/default -I/usr/include -I/usr/X11R6/include -o sipCaFrameworkQCaWidget.o sipCaFrameworkQCaWidget.cpp
In file included from /home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//data/include/QCaObject.h:46,
from /home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//data/include/QCaWidget.h:36,
from QCaWidget.sip:4:
/usr/include/QtCore/qobject.h: In copy constructor 'UserMessage::UserMessage(const UserMessage&)':
/usr/include/QtCore/qobject.h:309: error: 'QObject::QObject(const QObject&)' is private
/home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//data/include/UserMessage.h:38: error: within this context
In file included from QCaWidget.sip:4:
/home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//data/include/QCaWidget.h: In copy constructor 'QCaWidget::QCaWidget(const QCaWidget&)':
/home/cls1fs/epics/epics2//workspace/epicsqt/epicsqt-1.1.1-src//ca_framework//data/include/QCaWidget.h:43: note: synthesized method 'UserMessage::UserMessage(const
UserMessage&)' first required here
[...]
Any help is appreciated,
--
Emmanuel
More information about the PyQt
mailing list