From 97af1b839c04dbd83b5ba5bec138dd4718d4491a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 15 May 2020 03:03:56 +0200 Subject: Use | to OR some related flags And not +. Guess what, this was "accidentally" working around a number of bugs, most importantly QTBUG-75172 (which is caused by QTBUG-74639 and probably others). Change-Id: If13810d9408f2be7b87f0d259737bff8cacc6f7b Pick-to: 5.15 Reviewed-by: Samuel Gaist Reviewed-by: David Faure --- examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp b/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp index 938597a34e..5ddde156ae 100644 --- a/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp +++ b/examples/widgets/tutorials/modelview/2_formatting/mymodel.cpp @@ -100,7 +100,7 @@ QVariant MyModel::data(const QModelIndex &index, int role) const break; case Qt::TextAlignmentRole: if (row == 1 && col == 1) //change text alignment only for cell(1,1) - return Qt::AlignRight + Qt::AlignVCenter; + return int(Qt::AlignRight | Qt::AlignVCenter); break; case Qt::CheckStateRole: if (row == 1 && col == 0) //add a checkbox to cell(1,0) -- cgit v1.2.3