I would like to use a subclassed QSqlTableModel to fill a QTableView, but I'd like the order of the columns in the table to be different from the order of my fields in the database.

I thought there must be some way to modify the query in .select() but I haven't gotten that to work. Using setQuery only seems to prevent queries from returning values.

I also tried simply changing horizontalHeader().moveSection() on the table, but this is ugly as it needs to be reset each time I filter or select again.

Any ideas?

Thank you,
Tom
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to