Results 1 to 5 of 5

Thread: How to update model when data are stored and modified outside the model?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: How to update model when data are stored and modified outside the model?

    Quote Originally Posted by hind View Post
    I used to consider a model as an interface instead of a wrapper.anyway.
    That is a valid assumption, actually the very goal of most models.

    You only need to make sure the model knows about changes to the actual data, but that can be done in various ways.
    For example the class modifying the data could emit signals, the data could be in a class that has signals, the modifying code could tell the model, or, as wysota already said, the model can the only interface to the data.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    hind (25th October 2013)

Similar Threads

  1. Replies: 1
    Last Post: 29th August 2013, 05:41
  2. Replies: 9
    Last Post: 14th February 2013, 19:39
  3. Do I need update model in QT UI thread?
    By ysilent in forum Newbie
    Replies: 3
    Last Post: 23rd March 2012, 10:59
  4. Replies: 0
    Last Post: 2nd November 2011, 11:13
  5. Replies: 1
    Last Post: 24th February 2011, 05: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
  •  
Qt is a trademark of The Qt Company.