[SOLVED] QTableView Alignment
-
Hello everyone!
I am trying to align a QTableView column and its is not working.
When I do this it works fine:
@
modeloLancamentosInvestimento->setData(modeloLancamentosInvestimento->index(modeloLancamentosInvestimento->rowCount()-1, 0), Qt::AlignRight, Qt::TextAlignmentRole);
@But I need to align it vertically at the center to and when i try it does not work:
@
modeloLancamentosInvestimento->setData(modeloLancamentosInvestimento->index(modeloLancamentosInvestimento->rowCount()-1, 0), Qt::AlignRight | Qt::AlignVCenter, Qt::TextAlignmentRole);
@How can I do that?
Thanks all.
-
Hi,
What kind of model do you have under ?
-
I know that you are using a QTableView, the question is what is the model that you use ?
-
Then you should use QStandardItem::setAlignement