Results 1 to 2 of 2

Thread: QAbstractItemModel::dataChanged fires two times for single cell change

  1. #1
    Join Date
    Jun 2016
    Posts
    19
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default QAbstractItemModel::dataChanged fires two times for single cell change

    I am using QSqlTableModel + QTableView
    Why does the QAbstractItemModel::dataChanged signal fires two times for single cell data change.
    - first signal marks single cell changed
    - second signal marks entire row

    Qt Code:
    1. debug trace:
    2. onTableDataChanged top.left.ndx(9,5) bottom.righ.ndx(9,5) rules.size=0
    3. onTableDataChanged top.left.ndx(9,0) bottom.righ.ndx(9,10) rules.size=0
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: QAbstractItemModel::dataChanged fires two times for single cell change

    Looks like two different signal emits to me, so they might caused by different things.

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 26th May 2015, 14:59
  2. How to change color of single header cell?
    By Pablo1517 in forum Qt Programming
    Replies: 2
    Last Post: 25th November 2014, 08:03
  3. Replies: 1
    Last Post: 31st October 2014, 20:45
  4. Different text styles in a single cell of QTableView?
    By xfurrier in forum Qt Programming
    Replies: 2
    Last Post: 23rd August 2009, 06:49
  5. QTableView change color of current Cell
    By raphaelf in forum Qt Programming
    Replies: 4
    Last Post: 4th March 2006, 11:22

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.