Reputation: 17253
I wanted to know how we can change the order of columns in QtableView by dragging ? I currently have a class derived from FilterProxyModel as source to QtableView. I am using QT 4.8
Upvotes: 16
Views: 7926
Reputation: 17545
Qt 5.x:
ui->tableView->horizontalHeader()->setSectionsMovable(true);
QHeaderView::setSectionsMovable()
Qt 4.x:
ui->tableView->horizontalHeader()->setMovable(true);
Upvotes: 24