[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: Qt.FocusPolicy and StrongFocus
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2022-08-16 18:58:03
Message-ID: ad9848581a290cddc21f5c502a95dfa8 () riverbankcomputing ! com
[Download RAW message or body]
On 15/08/2022 16:16, John Ehresman wrote:
> I'm seeing exceptions with PyQt 6.3.1 when converting a C++
> Qt.StrongFocus enum to a python enum when the int value is 10. I think
> what's happening is that a StrongFocus value (11) is being set and
> then some code is clearing the TabFocus flag, leaving a value of 10 —
> I think the clearing of TabFocus happens in Qt C++ code, but I haven't
> verified this. The following Python code demonstrates the problem:
>
> p = Qt.FocusPolicy.StrongFocus
> i = p.value & ~Qt.FocusPolicy.TabFocus.value
> Qt.FocusPolicy(i)
Should be fixed in the next PyQt6 snapshot. The fix is to change /Flag/
to /IntFlag/ in the definition of FocusPolicy.
Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic