[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: PyQt6: QLocale.FloatingPointPrecisionOption should be an IntEnum
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2022-02-01 10:17:38
Message-ID: 4f56fa4ae0779a9ba233c50559d125aa () riverbankcomputing ! com
[Download RAW message or body]

On 31/01/2022 12:31, Ales Erjavec wrote:
> Hi,
> 
> QLocale.FloatingPointPrecisionOption
> (https://doc.qt.io/qt-5/qlocale.html#FloatingPointPrecisionOption-enum)
> cannot be used in PyQt6. It is specifically defined to be integer
> constants to be used in APIs taking `int precision` arguments, but in
> PyQt6 it is a plain enum and as such is is not cast-able to int.
> 
> ```
> from PyQt6.QtCore import QLocale
> 
> c = QLocale.c()
> print(c.toString(0.3, "f",
> QLocale.FloatingPointPrecisionOption.FloatingPointShortest))
> ```

Fixed in the next release.

Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic