PDA

View Full Version : how to forse QTableWidget to update whole row, when any item changed.



GreenScape
9th August 2010, 17:28
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()!

barnabyr
9th August 2010, 18:42
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/qabstractitemmodel.html#dataChanged

GreenScape
9th August 2010, 18:53
thanks for reply and link. i made some hack, which send signal for me, ie :


item.setData(Qt::userRole, "blah1");
item.setData(Qt::userRole, "blah2");

each time i need to redraw this item.