[Qt-interest] connecting QTreeWidgetItem with its own data
Malyushytsky, Alex
alex at wai.com
Mon Apr 20 21:57:28 CEST 2009
As I see it:
QTreeWidgetItem is not an QObject derived class.
So you either have to derive your class from QObject or remove Q_OBJECT macro, depending what you need.
Hope this helps,
Alex
________________________________________
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Giancarlo Amati
Sent: Monday, April 20, 2009 6:10 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] connecting QTreeWidgetItem with its own data
Hello everybody,
I'm trying to use QTreeWidgetItem in an extented way. My aim is to derive a new class CQVTKTreeWidgetItem from QTreeWidgetItem so that this new class as one more field called DATA linked to each Item i add in the treeWidget.
now, I derived my class from the QTreeWidgetItem in a public way. I added Q_OBJECT macro and created the correspondend MOC file. BUT
this is the error I get:
1>c:\kclsoftware\qtvtk_diorama\qtvtk_diorama\cqvtktreewidgetitem.moc(39) : error C2039: 'staticMetaObject' : is not a member of 'QTreeWidgetItem'
1> c:\qt\2009.01\qt\src\gui\itemviews\qtreewidget.h(64) : see declaration of 'QTreeWidgetItem'
1>c:\kclsoftware\qtvtk_diorama\qtvtk_diorama\cqvtktreewidgetitem.moc(53) : error C2039: 'qt_metacast' : is not a member of 'QTreeWidgetItem'
1> c:\qt\2009.01\qt\src\gui\itemviews\qtreewidget.h(64) : see declaration of 'QTreeWidgetItem'
1>c:\kclsoftware\qtvtk_diorama\qtvtk_diorama\cqvtktreewidgetitem.moc(58) : error C2039: 'qt_metacall' : is not a member of 'QTreeWidgetItem'
1> c:\qt\2009.01\qt\src\gui\itemviews\qtreewidget.h(64) : see declaration of 'QTreeWidgetItem'
so, what's the problem?
Kind regards.
Giancarlo
________________________________________
Il remix esclusivo di Messenger. Scaricalo gratis!
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list