When is a class added to the list of moc files

Martin Piskernig martin.piskernig at stuwo.at
Mon Apr 17 18:06:40 BST 2000


On Mon, 17 Apr 2000, Werner Modenbach wrote:
> Recently we created a class which was derived from QFrame.
> Everything worked fine until we tried to create a signal.
> The linker reclaimed for a missing reference.
> It took us a long while to find out that there is no meta object created from
> our class. Where do I tell to build a meta object. Isn't it possible to do this
> automatically when detecting signals or slots?
> 
> After we fixed this (by creating a new project and transfering the source to
> the prebuild classes - our project ist still small ;-)) now we tried to connect
> the signal to a slot of another class.
> This seend to work fine, but unfortinately when I debug until the emit
> statement the emit returns without calling the slot.
> 
> Do I have to take care about some specialities to make this work?

Did you add a Q_OBJECT to the beginning of your class? Also, a "make -f
Makefile.dist" is needed after this, then all should build correctly. 
-- 
Martin Piskernig
<mpiskernig at kdevelop.de>       ICQ: 24015591
The KDevelop Team           www.kdevelop.org





More information about the KDevelop mailing list