Qt-interest Archive, March 2002
Problems with Plugins
Message 1 in thread
Hallo,
I have some problems with Plugins and QT. I want to build some
QWidgetPlugins and display it in an Application.
I created the Plugin:
1) I created the Widget. It's just a simple Button. Really easy. It's
called TestMod (For TestModule).
2) I wrote the CustomWidgetPlugin class as described in the manual and
compiled it with the Widget to a lib. I got the libtestmod.so.1.0.0 with
some links to that file (libtestmod.so, libtestmod.1 and
libtestmod.1.0). CustomWidgetPlugin has the key TestMod!
3) I put these libs to the directory ./modules/widgets of my
test-Application.
4) I try this code:
QApplication a( argc, argv );
a.addLibraryPath("./modules/widgets");
a.addLibraryPath("./modules");
QWidgetFactory wf;
QWidget w = wf.createWidget("TestMod", NULL, NULL);
But w is always NULL!
I tried to add teh directory to LD_LIBRARY_PATH, but that didn't change
anything.
Maybe I didn't understand everything about plugins. I found out, how to
create them, but not, how to use them.
What have I done wrong? It would be nice if you could help me a little.
(I was unable to find something in the documentation. I read the
Reference of the plugins and the given Classes and of course the section
about custom widgets in the designer handbook.)
With kind regards,
Konrad Neitzel
--
[ signature omitted ]