[Qt-interest] Database abstraction with QSqlQueryModel

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Wed Aug 25 02:20:33 CEST 2010


Hi Neville, 

Have you tried setting your own query, then using
QSqlQueryModel.setQuery(const QSqlQuery &query)? 

What problems did you encounter? 

Tony.

> Just checking I've got this right and not missing something.
> 
> The QSqlQueryModel doesn't seem to support full database 
> abstraction. So 
> what I mean by this is parameters etc. QSqlQuery on which it is based 
> has bindValue(), but this is not implemented in 
> QSqlQueryModel and so I 
> have to code my own quoting and escaping of of data values? 
> Also can't 
> seem to find a way to use QSqlQuery to generate a sql 
> statement that I 
> can then pass to QSqlQueryModel.
> 
> Is this right, before I post an item on Qt bug tracker.
> 
> Thanks
> 
> Neville




More information about the Qt-interest-old mailing list