[PyQt] TypeError with QLocale and python2
Phil Thompson
phil at riverbankcomputing.com
Wed Feb 22 15:48:06 GMT 2017
On 22 Feb 2017, at 1:28 pm, Fabio Rossi <fabrossi79 at gmail.com> wrote:
>
> I'm using
>
> Python 2.7.12
> Qt 5.6.2
> PyQt 5.7.1
> sip 4.19.1
>
> In [1]: import PyQt5.QtCore
>
> In [2]: loc=PyQt5.QtCore.QLocale()
>
> In [3]: loc.toString(1)
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call last)
> <ipython-input-3-7e8f8bd03145> in <module>()
> ----> 1 loc.toString(1)
>
> TypeError: toString(self, float, format: str = 'g', precision: int =
> 6): argument 1 has unexpected type 'int'
>
> I'd expect
>
> Out[3]: '1'
>
> The same doesn't happen with python3
Should be fixed in tonights' snapshot.
Thanks,
Phil
More information about the PyQt
mailing list