Getting past the embedded Python and Qt slot conflict 

An issue I came across recently while trying to embed Python in a Qt application using the c API was a rather annoying conflict between the slot key word used by Qt and the use of the word slot in Python.

A way to get around this issue is to use the following section of code around your Python include statement.

#undef slot
#include "Python.h"
#define slot

I hope this helps if you run into the same issue 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s