Results 1 to 18 of 18

Thread: data, model and tree view

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2006
    Location
    San Jose, CA
    Posts
    53
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default data, model and tree view

    Hi,
    I have a maybe stupid question but, can anyone help me here:

    I have a data class which gets manipulated through a tableWidget. Then I have a model and a treeview based on that data. The data can only be viewed in the tree view. How do I tell the model that the data was changed through the table widget?

    The table widget looks like that:
    a1 1 2 3
    b1 4 5

    The tree view displays the full factorial combinations of a1 b1

    Qt Code:
    1. a1
    2. 1
    3. b1
    4. 4
    5. 5
    6. 2
    7. b1
    8. 4
    9. 5
    10. 3
    11. b1
    12. 4
    13. 5
    To copy to clipboard, switch view to plain text mode 

    So, adding a value to b1 would change the tree. I guess (at least I don't see how) I can't have a single model for the two different views since the setData is different for both views.
    I appreciate any comments to help me solve my problem.
    Thanks.
    Last edited by jacek; 24th June 2006 at 12:29. Reason: added code tags to make the tree structure visible

Similar Threads

  1. Drag and drop items in view to sort order
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 19:43
  2. Replies: 1
    Last Post: 1st March 2006, 11:43

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.