if i create the items without using the designer, it would be a problem for me, because there are lots of messages and there will be a lot of change in the message list. i don't want to edit the code manually everytime -if possible-.
if i create the items without using the designer, it would be a problem for me, because there are lots of messages and there will be a lot of change in the message list. i don't want to edit the code manually everytime -if possible-.
I'm not sure if i understood your problem.
You want to associate treeWidgetItems with message types without coding?
See GrEEn (Graphics Effects Environment)
http://sourceforge.net/project/platf...roup_id=232746
a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).
Yes, or any suggestion to carry out the work with another easy way.
As you may know in windows forms, the tree nodes can be given an object name so that the object can be identified. Is there such a feature for the Qt designer.
If that would not be possible, sure, I will construct the tree by coding.
Only QObjects(objects of classes that inherits QObject) can be named by setObjectName.
QTreeWidgetItem is not a QObject, so
i think you'll have to code it.
If you don't want to maintain additional code for it, consider reading massages types from kind of text file or xml.
See GrEEn (Graphics Effects Environment)
http://sourceforge.net/project/platf...roup_id=232746
a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).
alisami (16th July 2008)
Notice that QTreeWidgetItems have a built-in support for "types". Alternatively you can use QTreeWidgetItem::setData() with Qt::UserRole to store arbitrary identifier data to each item.
J-P Nurmi
Bookmarks