incapacitant
2nd March 2006, 14:37
I have this QtreeView 'table' based on a QStandardItemModel 'model'.
model->setHeaderData(0, Qt::Horizontal, tr("Mois"));
model->setHeaderData(1, Qt::Horizontal, tr("Facture"));
I found how I can set the header text, but not how I can resize the columns.
No member in QTreeView does that. And the model should not be involved I guess.
resizeColumnTo Contents does not help me.
So I don't know how I can resize my columns in the view !!
model->setHeaderData(0, Qt::Horizontal, tr("Mois"));
model->setHeaderData(1, Qt::Horizontal, tr("Facture"));
I found how I can set the header text, but not how I can resize the columns.
No member in QTreeView does that. And the model should not be involved I guess.
resizeColumnTo Contents does not help me.
So I don't know how I can resize my columns in the view !!