Having a toModel method is very conveinent for creating queries which is displayed in a QTableView.
However I think having ability to customize the column headers is necessary in the most cases.
I am thinking about implementing an intermediate class (derived from the QSqlQueryModel) which would override the headerData method, and the overridden header data could be set through the Query::setColumnName(Field, alias).
Hi @HamedMasafi
Having a toModel method is very conveinent for creating queries which is displayed in a QTableView. However I think having ability to customize the column headers is necessary in the most cases.
I am thinking about implementing an intermediate class (derived from the QSqlQueryModel) which would override the headerData method, and the overridden header data could be set through the Query::setColumnName(Field, alias).
How does this sounds for you?