[SOLVED] move column in qtable view
General and Desktop
5
Posts
2
Posters
3.1k
Views
1
Watching
-
In Java swingx, a user can move columns of a jtable and change columns position.
Is it possible with Qt C++ QTableView ? And QTableViewModel ?
Or is there another datagrid class to do that?
Maybe I don't have the right term of this feature to search in google... I found nothing about this.
-
Hi and welcome to devnet,
It's a bit more hidden. Try this:
@
QTableView * tableView = new QTableView(this);
tableView->horizontalHeader()->setMovable(true);
@Hope it helps
-
Right, QHeaderView has changed a bit in the transition to Qt 5.
You're welcome !
Now that you have it working, please, update the thread title prepending [solved] so other forum users may know a solution has been found :)