[Qt-interest] Problem with designer plugins

Neville Dastur qt at dastur.me.uk
Sat Mar 6 00:08:01 CET 2010


Thank you for reply.

Robert Wood wrote:
>  > I am having difficulties with custom widget designer plugins. I followed
>  > the manual and created by own plugin, but even through it built fine it
>  > never got installed and I couldn't use it by manually copying to
>  > $QTDIR/qt/plugins/designer directory
>  >
>  > Anyway, I then thought well lets just compile the customwidgetplugin
>  > example. Same problem. It builds just fine, but doesn't install and
>  > can't be used as plugin to designer.
>  >
>  > I installed Qt using the Qt SDK for 32-bit linux and I am running on
>  > Ubuntu 9.10 (GCC 4.4.1)
>  >
>  > So I am bit stuck. Has anyone else come across this problem?
>
> I struggled for ages with this just last week on Mandriva. I was missing 
> a couple of important steps.
>
> You have copied the .so file to $QTDIR/qt/plugins/designer and then 
> restarted designer? Don't forget the bit about restarting designer!
>   
I did do this and re-started. No joy. But just realised that there may 
be a difference between QtCreator and Designer and it seems to be so. 
Designer does load the plugin. The manual does not make this clear. In 
fact I am sure that the example is labelled for Custom Plugin for QtCreator.

It so seems that the lib file needs to be manually copied. The example 
states that the last INSTALLS line in the .pro file should do the 
copying. Is this a Qt bug?
> You should have libwidgetnameplugin.so in the 
> $QTDIR/qt/plugins/designer where widgetname is the name of your custom 
> widget.
>
> Don't forget also, that you'll have to add the new lib name path to your 
> .pro file and have the header file available for your program to compile!
>   
Is this step really necessary? I thought these were plugins that could 
be loaded into your application dynamically. I understand about the 
header file.
> Oh, the other thing to be sure is that designer is built with the same 
> version as creator and you're not using an incorrect version of designer 
> from your respoitory.
>
> Good luck. This is really confusing at first!
>   
Agreed. I think the documentation on this needs improving.
> Cheers,
>
> Rob
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   



More information about the Qt-interest-old mailing list