[PyKDE] PyQt + multiple Interpreters

Phil Thompson phil at riverbankcomputing.co.uk
Mon Sep 20 09:48:36 BST 2004


On Monday 20 September 2004 9:20 am, Christoph Wiedemann wrote:
> > On Friday 17 September 2004 10:17 am, Christoph Wiedemann wrote:
> > > Hi Phil,
> > >
> > > > SIP v3.x is deprecated. Try v4 see what happens.
> > >
> > > i've tried (sip 4.0.1) - and there are several issues arising from the
> >
> > fact
> >
> > > that i use embedded python interpreters.
> > >
> > > 1. i've used to link my application against libqtcmodule.so, which has
> > > disappeared (renamed to qt.so). I do this in order to use
> > > sipForceConvertTo_QWidget in my embedding application.
> > >
> > > What is the recommended way to get a QWidget pointer from a PyObject *
> >
> > in
> >
> > > an embedding application with sip 4.x ?
> >
> > Call sipForceConvertTo_QWidget(). It's covered in the documentation. You
> > don't
> > need to link against anything.
>
> If i don't link against the qt extension module, i'll get an unresolved
> symbol, if i use sipForceConvertTo_QWidget in the embedding application.
> Jim Bubliz' comment might help, though.

You won't get an unresolved symbol as SIP 4 modules don't export any symbols 
(apart from the module init function). You have to #include the correct .h 
file though (which expands sipForceConvertTo_QWidget to something useful).

Phil




More information about the PyQt mailing list