Results 1 to 8 of 8

Thread: treewidget and a message system

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2008
    Posts
    61
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    9

    Default Re: treewidget and a message system

    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-.

  2. #2
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 11 Times in 8 Posts

    Default Re: treewidget and a message system

    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).

  3. #3
    Join Date
    May 2008
    Posts
    61
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    9

    Default Re: treewidget and a message system

    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.

  4. #4
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 11 Times in 8 Posts

    Default Re: treewidget and a message system

    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).

  5. The following user says thank you to mchara for this useful post:

    alisami (16th July 2008)

  6. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: treewidget and a message system

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.