Results 1 to 13 of 13

Thread: How to inform a Model/TableView that some data changed?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    May 2009
    Location
    USA
    Posts
    300
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    82
    Thanked 11 Times in 11 Posts

    Default Re: How to inform a Model/TableView that some data changed?

    What about this?
    void QAbstractItemModel::dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ) [signal]

    This signal is emitted whenever the data in an existing item changes.

    If the items are of the same parent, the affected ones are those between topLeft and bottomRight inclusive
    Then connect the signal to a slot where you view->show to refresh it?

    How are you setting the model to the data? Seems like all you should have to do is re-run that code on the timer and the model/view signal slot will do what you want without further code.
    Last edited by waynew; 20th June 2010 at 20:39.

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

    moviemax (24th June 2011)

Similar Threads

  1. TableView/Model Display Question
    By SixDegrees in forum Qt Programming
    Replies: 9
    Last Post: 27th August 2010, 09:06
  2. Replies: 1
    Last Post: 1st February 2010, 18:42
  3. tableview model view problem
    By skuda in forum Qt Programming
    Replies: 5
    Last Post: 3rd December 2007, 14:02
  4. getting data from tableView
    By mkarakaplan in forum Newbie
    Replies: 1
    Last Post: 7th November 2007, 09:51
  5. Informing a model its data has changed
    By saknopper in forum Newbie
    Replies: 3
    Last Post: 17th January 2007, 19:58

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
  •  
Qt is a trademark of The Qt Company.