[Qt-interest] connecting QTreeWidgetItem with its own data

Giancarlo Amati ilferraresebono at hotmail.it
Mon Apr 20 15:09:45 CEST 2009


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

_________________________________________________________________
Quante ne sai? Scoprilo con CrossWire!
http://clk.atdmt.com/GBL/go/140630367/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090420/967fee20/attachment.html 


More information about the Qt-interest-old mailing list