summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xexamples/tutorials/modelview/2_formatting/mymodel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/tutorials/modelview/2_formatting/mymodel.cpp b/examples/tutorials/modelview/2_formatting/mymodel.cpp
index 98bbe02..e34e014 100755
--- a/examples/tutorials/modelview/2_formatting/mymodel.cpp
+++ b/examples/tutorials/modelview/2_formatting/mymodel.cpp
@@ -89,8 +89,7 @@ QVariant MyModel::data(const QModelIndex &index, int role) const
if (row == 1 && col == 2) //change background only for cell(1,2)
{
- QColor redColor(Qt::red);
- QBrush redBackground(redColor);
+ QBrush redBackground(QColor(Qt::red));
return redBackground;
}
break;