[SOLVED]switch columns in a QSqlRelationalTableModel
-
wrote on 10 Oct 2011, 15:40 last edited by
Hi,
is it possible to change the order of columns into a QSqlRelationalTableModel without having to manually specify a query? For instance, if I've got a table with (surname, name) and I want to display it as (name, surname), is there an easy and handy way? -
wrote on 10 Oct 2011, 17:54 last edited by
You can do it on the view level.
-
wrote on 10 Oct 2011, 18:45 last edited by
void QHeaderView::moveSection ( int from, int to )
-
wrote on 11 Oct 2011, 06:19 last edited by
[quote author="Eddy" date="1318272331"]void QHeaderView::moveSection ( int from, int to )[/quote]
Thanks, this is perfect!
-
wrote on 11 Oct 2011, 06:43 last edited by
Great!
Could you edit your title and add [solved] in front of it? Thanks.
1/5