Results 1 to 3 of 3

Thread: how to forse QTableWidget to update whole row, when any item changed.

  1. #1
    Join Date
    Jul 2010
    Posts
    53
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default how to forse QTableWidget to update whole row, when any item changed.

    dumd update dont work. also i have delegate performs paint; i want to redraw whole row, when current row changed(e.g set bold font); also i considered that when i change some cell data QItemDelegate calls drawDisplay() but don't calls paint()!
    Last edited by GreenScape; 9th August 2010 at 17:39.

  2. #2
    Join Date
    Mar 2006
    Location
    San Francisco, CA
    Posts
    23
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to forse QTableWidget to update whole row, when any item changed.

    in general you need to make sure that this signal is emitted for the model indices you care about.

    http://doc.trolltech.com/4.5/qabstra...ml#dataChanged

  3. #3
    Join Date
    Jul 2010
    Posts
    53
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to forse QTableWidget to update whole row, when any item changed.

    thanks for reply and link. i made some hack, which send signal for me, ie :

    Qt Code:
    1. item.setData(Qt::userRole, "blah1");
    2. item.setData(Qt::userRole, "blah2");
    To copy to clipboard, switch view to plain text mode 

    each time i need to redraw this item.

Similar Threads

  1. QTableWidget top row won't update
    By kiss-o-matic in forum Qt Programming
    Replies: 0
    Last Post: 22nd June 2010, 03:36
  2. update items in QTableWidget
    By darshan in forum Qt Programming
    Replies: 13
    Last Post: 3rd March 2009, 23:43
  3. Update to 4.4.2: cornerWidget functionality changed
    By mclark in forum Qt Programming
    Replies: 5
    Last Post: 21st November 2008, 02:14
  4. Catch item changed
    By nina1983 in forum Qt Programming
    Replies: 2
    Last Post: 18th July 2008, 15:40
  5. QTableWidget Update - slow
    By DPinLV in forum Qt Programming
    Replies: 16
    Last Post: 18th August 2006, 22:09

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.