Results 1 to 8 of 8

Thread: QTreeWidget and Graphics scene

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QTreeWidget and Graphics scene

    I have a QTreeWidget which shows data about graphics items and top level items are like groups which have different graphics items... attaching a snapshot of the treewidget.

    The tree displays info about items positions and names... I want to update the tree when items are moved (as items pos is displayed in the tree). How do I map the nodes of tree to the GraphicsItems ?? I mean how do i obtain a pointer to the GraphicsItem based on the node clicked in the tree ?? and how to refresh the data in the tree based on movements in the scene ??

    One method I found in the search forums was to subclass QTreeWidgetItem and have the desired info in it...is it a good one ??

    Please suggest...
    Attached Images Attached Images

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.