Slots in derived classes

Thomas Nesges ThomasNesges at TNT-Computer.de
Mon Dec 13 14:02:32 GMT 1999


On Mon, Dec 13, 1999 at 08:49:50AM +0100, Micko Roland wrote:

> you have commented out Q_OBJECT. Uncomment it and the code should work.

I did so. Perhaps I made my self not clear enough (sorry, if this
sentence is offending you, I'm not the very best English-speaker):
After uncommenting it I got the error messages at the bottom of my
first mail. Let me quote them again:

> > Ca somebody point me to what I have missunderstood?
> > Qt documentation says, that every class that uses slots has to 'mention'
> > Q_OBEJCT in it's definition. If I try to insert it (uncomment it), I get 
> > the followings:
> > 
> > /opt/kde/lib/libkdeui.so: warning: multiple common of `QArrayT<char>
> > type_info node'
> > datetimelabel.o: warning: previous common is here
> > /opt/kde/lib/libkdecore.so: warning: multiple common of `QArrayT<char>
> > type_info node'
> > datetimelabel.o: warning: previous common is here
> > /usr/lib/libqt.so: warning: multiple common of `QArrayT<char> type_info
> > node'
> > datetimelabel.o: warning: previous common is here
> > datetimelabel.o: In function `QArrayT<char> type_info function':
> > /usr/lib/qt/include/qarray.h(.text+0x19): undefined reference to
> > `DateTimeLabel::QPaintDevice virtual table'
> > /usr/lib/qt/include/qarray.h(.text+0x20): undefined reference to
> > `DateTimeLabel virtual table'
> > datetimelabel.o: In function `DateTimeLabel::~DateTimeLabel(void)':
> > /home/thomas/KDevelop/qtclock/qtclock/datetimelabel.cpp:26: undefined
> > reference to `DateTimeLabel::QPaintDevice virtual table'
> > /home/thomas/KDevelop/qtclock/qtclock/datetimelabel.cpp:26: undefined
> > reference to `DateTimeLabel virtual table'
> > collect2: ld returned 1 exit status
> > make: *** [qtclock] Error 1
> > *** Fehler ***

These are a bit strange to me..

TIA Thomas
-- 
                         --==[ www.tnt-computer.de ]==--




More information about the KDevelop mailing list