Can I add columns in a QListView object??
here's something I found here:
model->setHeaderData( 0, Qt::Horizontal, "numéro" );
model->setHeaderData( 1, Qt::Horizontal, "prénom" );
model->setHeaderData( 2, Qt::Horizontal, "nom" );
//...
model->setData( model->index( line, 0 ), contact->num(), Qt::DisplayRole );
model->setData( model->index( line, 1 ), contact->prenom(), Qt::DisplayRole );
model->setData( model->index( line, 2 ), contact->nom(), Qt::DisplayRole );
Since I'm using Qt Creator 2.0.1, I figured my model would be:
ui->ObjectName->model()
The application builds successfully but I get a: "The program has unexpectedly finished." at runtime.
Any Ideas ? Thanks.