[PyQt] TypeError with QLocale and python2
Fabio Rossi
fabrossi79 at gmail.com
Wed Feb 22 13:28:25 GMT 2017
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
Fabio
More information about the PyQt
mailing list