[Qt-interest] Undefined reference to (any custom widget)

Robert Wood robert.wood at apostrophe.co.uk
Sat Feb 27 12:50:49 CET 2010


I'm trying to work out how to get a custom widget working with creator 
that has been placed onto a form in designer.

I can compile carious custom widgets that I have from the example files 
or downloaded from the web. I can compile them, copy the the .so file to 
my /opt/qtsdk-2010.02/qt/plugins/designer/ directory and copy the header 
file to /usr/lib/qt4/include/

They then appear in designer.

However, even with off-the-shelf widgets such as this:

http://qt-apps.org/content/show.php/QLed+?content=72482

I get:

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

There are a few reference to this round the web, such as:

"Just add to your .pro file:
LIBS += -lqledplugin"

None of which work.

Can anyone help please? If you need any more information just ask.

Many thanks,

Rob



More information about the Qt-interest-old mailing list