I think there is a macro defined in one the Qt headers that turns "slots" into nothing.
This allows the following to work:
#include <QWidget> class Something : public QWidget { Q_OBJECT public slots: void doStuff(); };
That would explain why you get this error message. You compiler sees:
PyType_Slot *;
Because the "slots" word disappeared.
At least that's my theory.
Can you include Python.h before including any Qt headers, maybe that'll solve your problem.
On Mon, Feb 25, 2013 at 12:22 PM, ecir hana ecir.hana@gmail.com wrote:
Hello,
I try to embed Python into Qt application but when I add
#include <Python.h>
at the top for working app, the compilation breaks with:
../sample/python3.3m/object.h:432:23: error: expected member name or
';' after declaration specifiers PyType_Slot *slots; /* terminated by slot==0. */ ~~~~~~~~~~~ ^
Please, does anyone know why this happens? I'm new to all this compilation stuff - could it be that Python defines the same names as Qt? Namely "slots"?
Qt uses "clang++", it that changes anything...
capi-sig mailing list capi-sig@python.org http://mail.python.org/mailman/listinfo/capi-sig
-- Francis Bolduc, B.Sc. CM-Labs Simulation Inc.
participants (1)
-
Francis Bolduc