Fwd: Can't subclass/derive QCheckListItem ????

bretzel serge.lussier at videotron.ca
Thu Dec 12 17:25:08 UTC 2002


Hi there, this message was sent to qt mailing list...

I am asking also here because I need quick answers.


----------  Forwarded Message  ----------

Subject: Can't subclass/derive QCheckListItem ????
Date: December 12, 2002 11:11 am
From: bretzel <serge.lussier at videotron.ca>
To: qt-interest at trolltech.com

HI,

I try to extend the QCheckListItem class to hold extra data ...

class QCheckListBoxItemEx public QCheckListItem {
Q_OBJECT
public:
    [...Not relevant - SKIPPED]
    virtual void paintCell(...);
etc...
   CItemContainer* Data(){
	return mData;
   }
   void setData(CItemContainer* pData){
       mData = pData;
   }
   etc...
private:
   CItemContainer* mData;
   etc...
};

I know -- Its not a ListBoxItem but really a listviewitem derivated class. I 
have misstyped the classname...

...
when compiler goes qchecklistboxitemex.moc.cc
it fails :

[...SKIPPED]
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -O0 -g3 -Wall
-fno-exceptions -fno-check-new -c -o qchecklistboxitemex.moc.o `test -f
'qchecklistboxitemex.moc.cc' || echo './'`qchecklistboxitemex.moc.cc
qchecklistboxitemex.moc.cc: In static member function `static QMetaObject*
QCheckListBoxItemEx::staticMetaObject()':
qchecklistboxitemex.moc.cc:54: no method `QCheckListItem::staticMetaObject'
qchecklistboxitemex.moc.cc: In member function `virtual void*
QCheckListBoxItemEx::qt_cast(const char*)':
qchecklistboxitemex.moc.cc:73: no method `QCheckListItem::qt_cast'
qchecklistboxitemex.moc.cc: In member function `virtual bool
QCheckListBoxItemEx::qt_invoke(int, QUObject*)':
qchecklistboxitemex.moc.cc:78: no method `QCheckListItem::qt_invoke'
qchecklistboxitemex.moc.cc: In member function `virtual bool
QCheckListBoxItemEx::qt_emit(int, QUObject*)':
qchecklistboxitemex.moc.cc:83: no method `QCheckListItem::qt_emit'
qchecklistboxitemex.moc.cc: In member function `virtual bool
QCheckListBoxItemEx::qt_property(int, int, QVariant*)':
qchecklistboxitemex.moc.cc:90: no matching function for call to
`QCheckListBoxItemEx::qt_static_property(QCheckListBoxItemEx* const, int&,
int&, QVariant*&)'
qchecklistboxitemex.h:29: candidates are: static bool
QCheckListBoxItemEx::qt_static_property(QObject*, int, int, QVariant*)
qchecklistboxitemex.moc.cc:91: no method `QCheckListItem::qt_property'
qchecklistboxitemex.moc.cc: In static member function `static bool
QCheckListBoxItemEx::qt_static_property(QObject*, int, int, QVariant*)':
qchecklistboxitemex.moc.cc:96: no method `QCheckListItem::staticMetaObject'
gmake[2]: *** [qchecklistboxitemex.moc.o] Error 1
gmake[2]: Leaving directory
`/home/programming/Work/KDE/kactionworkshop/kactionworkshop'
gmake[1]: Leaving directory `/home/programming/Work/KDE/kactionworkshop'
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** failed ***

----------------------------------------------------------------------------------------------------------
This is the very first time it happens for me... I can't figure out what is
wrong ...

regards,
Bretzel

-------------------------------------------------------





More information about the KDevelop-devel mailing list