Results 1 to 9 of 9

Thread: How to communicate btw QGraphicsScene and QTreeWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to communicate btw QGraphicsScene and QTreeWidget

    Hey,

    i wanna know whats the best way to communicate between a QGraphicScene and a QTreeWidget.

    I have a QTreeWidget containing some QTreeWidgetItems and a QGraphicsView containing some QGraphicsItems, representing the positions of the items shown in the QTreeWidget.

    What i want to do: if you select an item in the TreeView, the corresponding GraphicsItem in the GraphicsView should be selected. and the other way around: select an item in the graphics view and the corresponding QTreeWidgetItem should be highlighted.

    I created a class which inherits both QGraphicItem and QTreeWidgetItem, but i couldnt figure out how to connect the view and the treewidget properly.

    Maybe you have some ideas?

    Greetings,
    Lutz
    Last edited by Cal; 20th November 2009 at 02:16.

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.