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

List:       pykde
Subject:    Re: [PyQt] DeprecationWarning using TextAlignmentRole in a QStandardItem subclass
From:       Sibylle Koczian <nulla.epistola () web ! de>
Date:       2020-01-19 12:21:14
Message-ID: 47ab6704-3554-77b6-2408-f4143eb50820 () web ! de
[Download RAW message or body]

Am 19.01.2020 um 12:42 schrieb Phil Thompson:
> On 18/01/2020 12:15, Sibylle Koczian wrote:
>> If I execute the following script I get this warning:
>>
>> Warning (from warnings module):
>>   File "D:\Sibylle\Src\PythonVersuche\PyQt\test_warning.py", line 77
>>     app.exec_()
>> DeprecationWarning: an integer is required (got type Alignment).
>> Implicit conversion to integers using __int__ is deprecated, and may be
>> removed in a future version of Python.
>
> It should be fixed in tonight's PyQt snapshot.
>
> In the meantime if you want to avoid the warning then do as it suggests
> and make the conversion explicit, ie. change the 'return' statement to...
>
>      return int(h_align | QtCore.Qt.AlignVCenter)
>

Thank you. Because the warning just contained the "app.exec_()" I didn't
understand that this was suggested.

Sibylle

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

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

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