Line 3 gathers the result you would received from a base QSqlQueryModel and that is returned unless the role is BackgroundColorRole.