darryl.wallace at prosensus.ca
Thu Jan 14 13:50:36 GMT 2010
> when I use toDouble() I obtain a data in this format:
> (9.5, True)
The method definition for "toDouble" in C++ is:
The "ok" value will be true if the conversion to a double was successful.
Because passing a pointer into a function this way is not "Pythonic," Phil
had it return the value and success in a tuple (at least I think that was
So this means you need to index the first value of the tuple, e.g. value =
> When it should be a float 9.50 (cause like I said, is what I have in DB).
> How can I get it 2 decimals positions?
As Andreas noted in the next post, the decimal places shouldn't matter
because it's a double precision floating point value. If you want it to be
placed in your data base as a string with two decimal places, then export it
to the database with a formatted string. But I'm not sure this is what
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt