[Interest] Problems when updating view/delegate

Timo Falk timo.falk.extern at hmk.atlas-elektronik.com
Wed Feb 8 16:17:36 CET 2012


On Fri Feb 03 2012 11:47:20 GMT+0100, norulez at me.com <norulez at me.com> wrote:
> 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.

Is the delegate set as column-delegate for all columns?

> 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?

Use the data()-function of the model with Qt::BackgroundRole or set 
the/a delegate on every column.

Timo



More information about the Interest mailing list