[PyQt] Checking a window's state using '&' is always returning False
me at the-compiler.org
Mon Aug 21 22:00:05 BST 2017
On Mon, Aug 21, 2017 at 04:55:22PM -0400, Jayson Kempinger wrote:
> How should I be checking the window state then? The same comparison works well for Qt alignment and Qt modifier keys:
> > if event.modifiers() & Qt.ShiftModifier:
> > shift = True
> > if event.modifiers() & Qt.ControlModifier:
> > ctrl = True
Not if you want to check for Qt.NoModifier which is 0 too. You can't
check for 0 with &.
> So I assumed I should be checking window state in the same way.
If you really care about Qt.WindowNoState, you'd probably need to check
for that with ==.
https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the PyQt