PDA

View Full Version : qt4+xp: QTreeView w/o header ?



incapacitant
5th March 2006, 18:56
Is it possible to create a QTreeView without header :


model = new QStandardItemModel(0, 2, this);
model->setHeaderData(0, Qt::Horizontal, "Mois");
model->setHeaderData(1, Qt::Horizontal, "Facture");



I used this code for the model, but if I remove setHeaderData it add new labels anyway that are the column numbers ?

How can have only the data rows and no header ?

wysota
5th March 2006, 19:00
QTreeView *tv = new QTreeView(...);
//...
tv->header()->hide();