Results 1 to 13 of 13

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Location
    Salatiga, Indonesia
    Posts
    160
    Thanks
    11
    Thanked 32 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    1

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

    Quote Originally Posted by Petruza View Post
    Can't I just inform the view to update exactly the cell I know has changed?
    I tried with the signal QAbstractItemModel::dataChanged, but I can't emit it from a QAbstractTableModel subclass, although it should inherit QAbstractItemModel's members, so what, aren't signals inherited?
    You should emit QAbstractItemModel::dataChanged() signal inside QAbstractItemModel::setData() function.

    So, how do you implement QAbstractItemModel::setData() function in your custom model?

    For more informations about model subclassing, you can look at Model Subclassing Reference.
    Last edited by saa7_go; 24th July 2010 at 08:12. Reason: updated contents

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.