[PyQt] QVariant.toFloat()

Gustavo A. Díaz gustavo.diaz at gmail.com
Thu Jan 14 12:29:42 GMT 2010


Ok, thanks Guys.

2010/1/13 Phil Thompson <phil at riverbankcomputing.com>

> On Wed, 13 Jan 2010 17:56:57 -0300, Gustavo A. Díaz
> <gustavo.diaz at gmail.com> wrote:
> > Hi guys,
> >
> > When i try to convert a QVariant.toFloat() it says
> >
> > "'QVariant' object has no attribute 'toFloat'"
> >
> > Should work according to
> http://qt.nokia.com/doc/4.6/qvariant.html#toFloat
> >
> > Is this not implemented in PyQt 4.6.2? (using Qt4.6.0)
>
> No - it will be in PyQt 4.7.
>
> > Or i am doing something wrong?
> >
> > In where i am trying to do this:
> >
> > total = query.record().value("total").toFloat()
> >
> > Where "total" entry in DB (mysql) is decimal(10,2).
> >
> > Cheers.
>
> Phil
>



-- 
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100114/6455d3ac/attachment.html>


More information about the PyQt mailing list