[PyQt] What about qtbrowserplugin?

David Boddie david at boddie.org.uk
Sat Jun 20 17:07:40 BST 2009


On Sat Jun 20 15:21:28 BST 2009, piotr malinski wrote:

> Well, making a binding for QtNPBindable and QtNPFactory isn't the
> problem... as compiling it against the qtbrowserplugin which doesn't
> install anywhere on the system -_- even adding the  qtbrowserplugin.o
> qtbrowserplugin_x11.o to OFILES i Makefile still makes broken binary:
>
> /usr/lib64/python2.6/site-packages/QtBrowserPlugin.so: undefined symbol:
> _Z16qtns_instantiatev

Yes, the qtns_instantiate() function is usually provided by the specific
plugin implementation, via the QTNPFACTORY_END() macro.

> (undefined symbol: _ZTI11QtNPFactory when compiled without those two *.o
> files). Any ideas? :) I'm not good at compiling C/C++ with libraries in
> chaos ;)

I would implement qtns_instantiate() to return an instance of a QtNPFactory
subclass written in Python. This subclass would do what the QtNPClassList
implementation would do in a C++ plugin - this subclass is made using the
QTNPFACTORY_BEGIN() macro in C++.

The qtns_instantiate() function will also need to initialize the Python
interpreter.

David


More information about the PyQt mailing list