Results 1 to 8 of 8

Thread: Updating a View when Model Changes Externally

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Location
    Mexico
    Posts
    81
    Thanks
    6
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Updating a View when Model Changes Externally

    try to use the signal dataChanged() in the QAbstractItemModel class for enforce a update in the views.

    if the data was modified for a external class. emit a signal to notify the change and connect whit one slot in the model. and emit the signal dataChanged. the only problem are indicate what modelIndex was modified.

    i hope you found this useful.
    Last edited by ecanela; 21st November 2009 at 06:50. Reason: reformatted to look better

Similar Threads

  1. hierarchical model in a flat view
    By gniking in forum Qt Programming
    Replies: 4
    Last Post: 10th November 2009, 20:17
  2. Model / View - Design Question
    By antarctic in forum Qt Programming
    Replies: 8
    Last Post: 8th June 2009, 07:39
  3. Replies: 1
    Last Post: 14th January 2009, 10:10
  4. Model, View and Proxy
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 21st November 2006, 08:50
  5. Replies: 6
    Last Post: 20th April 2006, 10:23

Tags for this Thread

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.