You can access the query object of the model (QSqlQueryModel::query()) and modify it in a way you want and then set it back using QSqlQueryModel::setQuery().