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

List:       pykde
Subject:    Re: more enum goodness
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2022-07-14 9:04:14
Message-ID: dbdeff67df2e28f0f74ad080f1e88a46 () riverbankcomputing ! com
[Download RAW message or body]

On 14/07/2022 03:38, Kovid Goyal wrote:
> The stateChanged signal in PyQt6 delivers ints instead of 
> Qt.CheckState,
> which means the following breaks:
> 
> check_box.stateChange.connect(do_something)
> 
> def so_something(state):
>    if state == Qt.CheckState.Checked:
>       print('checked')
> 
> Instead one has to do:
> 
> def so_something(state):
>    if Qt.CheckState(state) == Qt.CheckState.Checked:
>       print('checked')

https://www.riverbankcomputing.com/pipermail/pyqt/2022-July/044778.html

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

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