diff options
Diffstat (limited to 'examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp')
-rw-r--r-- | examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp b/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp index 0203345540..229aa48ad7 100644 --- a/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp +++ b/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp @@ -41,22 +41,22 @@ QVariant MyModel::data(const QModelIndex &index, int role) const .arg(row + 1) .arg(col +1); case Qt::FontRole: - if (row == 0 && col == 0) { //change font only for cell(0,0) + if (row == 0 && col == 0) { // change font only for cell(0,0) QFont boldFont; boldFont.setBold(true); return boldFont; } break; case Qt::BackgroundRole: - if (row == 1 && col == 2) //change background only for cell(1,2) + if (row == 1 && col == 2) // change background only for cell(1,2) return QBrush(Qt::red); break; case Qt::TextAlignmentRole: - if (row == 1 && col == 1) //change text alignment only for cell(1,1) + if (row == 1 && col == 1) // change text alignment only for cell(1,1) return int(Qt::AlignRight | Qt::AlignVCenter); break; case Qt::CheckStateRole: - if (row == 1 && col == 0) //add a checkbox to cell(1,0) + if (row == 1 && col == 0) // add a checkbox to cell(1,0) return Qt::Checked; break; } |