I've made some tiny progress on this in that if I add the directory I 
created by custom widget in, designer can see it. The other thing I 
hadn't realised is that to put the widget in a directory other than the 
one it's in, you seem to need to run "make install" from the command line.

However, all this still doesn't really help as I'm getting the error:

/home/robertw/Software/Qt4/Qt4Test/ui_mainwindow.h:59: undefined 
reference to `rwLineEdit::rwLineEdit(QWidget*)'

On this line:

testWidget = new rwLineEdit(centralWidget);

in the ui_mainwindow.h file.

It has autoinserted

#include "rwlineedit.h" in the ui_mainwindow.h and I have tried putting 
in my source directory and in /opt/qtsdk-2010.02/qt/include but to no 
avail.

I have tried taking the example projects directly from the sdk and they
refuse to work as well.

I have been over and over the documentation now and just can't see what 
I could be doing wrong. Has no-one else ever tried this?

I seem to be close but missing one vital step. :~/

Cheers,

Rob


> Friedemann Kleint wrote:
>> Hi,
>>
>> here is an extract from the documentation we are planning to add to shed some
>> light onto the Qt Designer plugin issue. I hope it helps:
>>
>> "...You can use Qt APIs to create plugins that extend Qt Designer. Qt 
>> Designer
>> fetches plugins from the standard locations and loads the plugins that match
>> its build key. For more information on how to create and locate plugins and 
>> to
>> change the default plugin path, see {How to Create Qt Plugins}.
>>
>> Qt Designer is integrated into  Qt Creator and in addition comes as a
>> standalone application. The correct folder to place the plugins depends on
>> which you use. The integrated Qt Designer fetches plugins from the
>> %SDK%\bin\designer folder on Windows and Linux and
>> QtCreator.app/Contents/MacOS/designer folder on Mac. Choose Tools>  Form
>> Editor>  About Qt Designer Plugins.
>>
>> The standalone Qt Designer is part of the Qt library used for building
>> projects, located under %SDK%/qt. Therefore, it fetches plugins from the
>> following folder: %SDK%\qt\plugins\designer. To check which plugins where
>> loaded successfully and which failed, choose Help>  About Plugins in the Qt
>> Creator.
>>
>> The Qt Creator that is included in pre-built SDK packages on Windows is built
>> with the Microsoft Visual Studio compiler, whereas the version of Qt shipped
>> for building applications is configured and built to use the MinGW/g++
>> compiler. Plugins built by using this version of Qt cannot be loaded by Qt
>> Creator because the build-keys do not match. The plugins can only be used in
>> the standalone version of Qt Designer. Choose Help>  About Qt Creator to 
>> check
>> the Qt version Qt Creator was built with.
>>
>> If you want to use Qt Designer plugins that were built for the shipped Qt
>> version, you need to make sure that Qt Creator is built with the same 
>> compiler
>> by either recompiling Qt Creator using MinGW or recompiling Qt with Microsoft
>> Visual Studio, depending on which configuration you want to use for your
>> applications."
>>
>> Regards,
>> Friedemann
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
_______________________________________________
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to