[PySide] Seeing Deprecation Warning messages

Ed Lipson edlipsongm at gmail.com
Fri Mar 27 14:58:38 CET 2020


I had tried that first.

DeprecationWarning: an integer is required (got type
PySide2.QtCore.Qt.AlignmentFlag).  Implicit conversion to integers using
__int__ is deprecated, and may be removed
in a future version of Python.
  twi.setTextAlignment(int(Qt.AlignRight | Qt.AlignVCenter))

Thanks,
Ed


On Fri, Mar 27, 2020 at 8:40 AM Cristián Maureira-Fredes <
Cristian.Maureira-Fredes at qt.io> wrote:

> Hello,
>
> I really thought we fix this in the past,
> since I have seen it...anyway
>
> On 3/27/20 12:30 PM, Ed Lipson wrote:
> >
> > What is the suggest syntax to future proof the code?
>
> I think
>    twi.setTextAlignment(int(Qt.AlignHCenter | Qt.AlignVCenter))
>
> should work.
>
> Cheers
>
> --
> Dr. Cristian Maureira-Fredes
> R&D Manager
>
> The Qt Company GmbH
> Erich-Thilo-Str. 10
> D-12489 Berlin
>
> Geschäftsführer: Mika Pälsi,
> Juha Varelius, Mika Harjuaho
> Sitz der Gesellschaft: Berlin,
> Registergericht: Amtsgericht
> Charlottenburg, HRB 144331 B
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> https://lists.qt-project.org/listinfo/pyside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20200327/cf062af9/attachment.html>


More information about the PySide mailing list