Results 1 to 2 of 2

Thread: Design help please

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Design help please

    I am working on an application which has 2 representations of a diagram.

    1. Drawing view. Elements are drawn as parent, children and siblings. For this I am using QGraphicsView / QGraphicsScene /QGraphicItem etc.
    2. Tree view. The diagram also needs to to represented as a tree.

    When the diagram is edited the tree view should be updated and vice-versa.

    I was thinking if its possible to use QAbstractItemModel to represent the both. Basically the model will have QGraphicsItem(s) as the data and then both the views (tree and scene) gets updated when the model changes.

    If the above solution not possible then can you please suggest best possible solution in this case?

    Thanks a lot

  2. #2
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Design help please

    I think you should make a model that reads its data from QGraphicsScene.
    so it is seems that any modifications via Tree view should be applied to the QGraphicsScene and 'QGraphicItem's.

Similar Threads

  1. C++/QT Design
    By xmeister in forum Newbie
    Replies: 6
    Last Post: 2nd April 2009, 02:39
  2. Replies: 3
    Last Post: 5th October 2008, 23:41
  3. Multiplatform Video Viewer Application Design Options
    By PhilippB in forum Qt Programming
    Replies: 2
    Last Post: 18th August 2008, 09:38
  4. Design problem/question
    By Valheru in forum Qt Programming
    Replies: 2
    Last Post: 27th September 2006, 21:45
  5. Dialog and code design issue
    By Gopala Krishna in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2006, 17:54

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.