[PyKDE] Using QSqlQuery + bindValue = TypeError ?

Hans-Peter Jansen hpj at urpla.net
Sun Feb 27 14:08:17 GMT 2005


On Sunday 27 February 2005 14:37, Jorge Godoy wrote:
>
> But I keep always getting the following error message:
>
>     query.bindValue(":senha", senhaNova)
> TypeError: argument 2 of QSqlQuery.bindValue() has an invalid type

Try:
    query.bindValue(":senha", QVariant(senhaNova))

Phil, Qt is able to cast such stuff automatically, IIRC. Why can't 
PyQt do this for us, too?

Pete




More information about the PyQt mailing list