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);
modeloLancamentosInvestimento->setData(modeloLancamentosInvestimento->index(modeloLancamentosInvestimento->rowCount()-1, 0), Qt::AlignRight, Qt::TextAlignmentRole);
To copy to clipboard, switch view to plain text mode
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);
modeloLancamentosInvestimento->setData(modeloLancamentosInvestimento->index(modeloLancamentosInvestimento->rowCount()-1, 0), Qt::AlignRight | Qt::AlignVCenter, Qt::TextAlignmentRole);
To copy to clipboard, switch view to plain text mode
How can I do that?
Thanks all.
Bookmarks