The way I would do this is to make a custom role for the background and use that to paint the background in the delegate.
You have to emit dataChanged() for the cells where the background should be updated as well as the column2 cells for the delegates to be notified about the change. Bo. Den 03-02-2012 11:47, [email protected] skrev: > Hello @all, > > lets say I have a model with 5 columns and 3 rows. > > The delegate should set the background color for the individual rows > depending on which value is in column 2. > > Now my main problem is that when I change the value of column 2, then only > the background of column 2 is changed. > > How can I update the view so that all columns are updated? > > mytableview->repaint is too expensive. > > Thanks in advance > > Best Regards > NoRulez > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest Bo Thorsen, Fionia Software. -- Expert Qt and C++ developer for hire Contact me if you need expert Qt help http://www.fioniasoftware.dk _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
