ui->HostList->model()
What is your model? Have you implemented the setData() method on it? If so, have you implemented it for the Qt:: BackgroundRole role?