[PyKDE] Re: embedding python widgets in C++ app

Phil Thompson phil at riverbankcomputing.co.uk
Sat Jan 27 09:41:54 GMT 2007


On Saturday 27 January 2007 4:21 am, Patrick Stinson wrote:
> ok, removing all instances of "PyQt4." from the cpp, and without
> modifying the sip files, I get this error for
> PyRun_SimpleString("import QtCore; print QtCore"):
>
> SystemError: _PyImport_FixupExtension: module QtCore not loaded
>
> and this error for PyRun_SimpleString("import QtGui; print QtGui"):
>
> ImportError: No module named PyQt4.QtCore
>
> After changing the module names in the sip files and recompiling the
> PyQt4 static libs it seems to work. I That means that the PyQt4
> package definately gets in the way.
>
> So this looks fine except everyone on our team has to do this
> everytime they download a new version. Ideas?

So if I added a command line flag to SIP to ignore all but the last part of 
a %Module directive, and tied that flag to the -k flag of PyQt's 
configure.py, then it should work Ok?

Phil




More information about the PyQt mailing list