PDA

View Full Version : How to change columns order in a QTableView...



cydside
20th April 2009, 10:03
Hi to All,
I'm populating a QTableView using a QSqlQueryModel and the fields order is not exactly what I'd like to show!
Is it possible to change the columns order in a QTableView?

Thanks

mazurekwrc
20th April 2009, 10:42
QHeaderView *header= tableView->horizontalHeader();
header->moveSection( 1, 0 );