PDA

View Full Version : problem/error in adding custom widget plugins



miroslav_karpis
10th March 2009, 14:42
Hi All,
please can you help me with this? (Ubuntu, Qt Creator)

I have made one simple custom widget plugin (following the "worldtimeclock custom widget plugin" example). I have compiled it and created a *.so library.

I restart the QtCreator and can see my custom widget in the designer menu - great. Then I (move it) to my mainWindow form.

Then I add widget library to *.pro file:
LIBS += -L/opt/qtsdk-2009.01/bin/designer -lPanelPlayer

run "qmake": no problem
run "make": no problem - this means that the library PATH is correct

BUT when I want to execute it I got a reply:
error while loading shared libraries: libworldtimeclockplugin.so: cannot open shared object file: No such file or directory


Please do you know that what can be the problem?

miroslav_karpis
11th March 2009, 12:54
solution to the problem (http://www.qtcentre.org/forum/f-qt-programming-2/t-multiple-designer-plugin-in-one-dll-19346-post95508.html#post95508)

miroslav_karpis
12th March 2009, 09:54
I have one more question here.
Base on the instructions:

"problem is that your application has to link with the code of the widget you are trying to use. And to do that, the library has to be found by the dynamic linker not only at compile time, but also during run time. You have to place the library in a path where linker will be looking for it. You can use the LD_LIBRARY_PATH variable to extend the linker lookup path if you need to"

I can run the application from a command line - that works fine. The problem is that when I want to run in QtCreator I'm getting those error messages.
Where can I place my library so that Qt will find during "run"?

miroslav_karpis
13th March 2009, 08:53
OK,...so I figured that out - and it was not so hard ;)

just place the plugin library into you root lib folder (/lib - under Linux OS)