Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, November 2006
AW: AW: QTreeView - repaint() - no effect


Message 1 in thread

 
Thank you for your interest!


Problem is: I have to update the images whenever the data of OTHER
"cells" has changed. I understand that Qt repaints only the cells
defined by the QModelIndexes of the dataChanged method.

So I connected the model's dataChanged method with a custom slot, which
is called whenever the signal is emitted, regardless of the indexes. In
that slot I tried to call the repaint method - without the desired
effect. Than I substituted the repaint with code resizing the cell's
height, which worked and proved that the method is called at the right
time, however, I can't leave it at that of course ...


r.



---------------------------------------

But you should not need to call the repaint.  If your model emits the
dataChanged( QMI, QMI) your view should only repaint the indexes that
have been changed.

Scott

---------------------------------------

Could you explain when, where and how do you emit dataChanged signal?
After emitting that signal you shouldn't need to call repaint().


---------------------------------------

--
 [ signature omitted ]