Are you sure that there are no other errors? Maybe your compiler can't find Qt headers?Originally Posted by agent007se
Are you sure that there are no other errors? Maybe your compiler can't find Qt headers?Originally Posted by agent007se
Last edited by jacek; 26th June 2006 at 19:30.
Try putting this on line 18 of MOC'ed file.
Then we might get other errors due to some Qt include related configuration.
The Keyboard Is Mightier Than The Sword!
That wasn't the problem !Originally Posted by bits
I solved the problem with deleting all "crap" files that weren't needed anymore and now it works BUT I have a new problem which fit nicely with the title of this topic so we can continue now :
here is the output :
I think that the better thing to do is restarting a new and clean project file because I'll use a QTreeWidget which have the function I wanted so that I don't need to extend anything !Linking executable: C:\test\app.exe
.objs\moc_qlistviewext.o:moc_qlistviewext.cpp.rdata$_ZTV12QListViewExt[vtable for QListViewExt]+0x14): undefined reference to `QListViewExt::~QListViewExt()'
.objs\moc_qlistviewext.o:moc_qlistviewext.cpp.rdata$_ZTV12QListViewExt[vtable for QListViewExt]+0x18): undefined reference to `QListViewExt::~QListViewExt()'
.objs\moc_qlistviewext.o:moc_qlistviewext.cpp.rdata$_ZTV12QListViewExt[vtable for QListViewExt]+0x190): undefined reference to `non-virtual thunk to QListViewExt::~QListViewExt()'
.objs\moc_qlistviewext.o:moc_qlistviewext.cpp.rdata$_ZTV12QListViewExt[vtable for QListViewExt]+0x194): undefined reference to `non-virtual thunk to QListViewExt::~QListViewExt()'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 10 seconds)
0 errors, 0 warnings
Thanks for trying to help me !
Oh, last thing, can you say me if there is a "default" structure of tree in QTreeView like in QTreeWidget ?
Maybe you forgot to implement the destructor?Originally Posted by agent007se
Please, can you give me a minimal implementation of qlistviewext.cpp in regard of the qlistviewext.h ?Originally Posted by jacek
I have some difficulties to do that because I'm just beginning with "serious" things with Qt !!
I'll give you a thank just after that!!
Originally Posted by agent007se
Your constructor signature looks like if you were trying to use Qt3, not Qt4. Qt4 doesn't use name parameter in widget constructors.Qt Code:
{ setObjectName( name ); } QListViewExt::~QListViewExt() { // empty }To copy to clipboard, switch view to plain text mode
agent007se (27th June 2006)
Well, it work like a charm now.
- Removed the name because I was using an old howto !
- Added the desctructor
Thanks again!
Bookmarks