[Qt-interest] Adding custom widget plugins error/problem

Andreas Pakulat apaku at gmx.de
Tue Mar 10 10:27:38 CET 2009


On 10.03.09 09:52:59, miroslav wrote:
> Hi All,
> please can you help me with this?
> 
> I have compiled the worldtimeclockplugin and placed it into
> QtCreator/Designer folder.
> 
> When I move it to my form and compile it I'm getting following error:
> 
> /media/disk/01_SourceCodes/05_VFST/src/ui_VFST.h:80: undefined reference
> to `WorldTimeClock::WorldTimeClock(QWidget*)'
> :-1: error: collect2: ld returned 1 exit status
> 
> 
> On line 80: was generated following code:
> worldTimeClock = new WorldTimeClock(centralWidget);
> 
> 
> Please do you know that what can be the problem?

You didn't specify a constructor for your custom widget usable for the
generated code. You have to supply a constructor taking a QWidget*
argument, just like QWidget and QWidget derived classes in the Qt API do.

Andreas
 
-- 
Today is the tomorrow you worried about yesterday.



More information about the Qt-interest-old mailing list