Qt.FocusPolicy and StrongFocus
John Ehresman
jpe at wingware.com
Mon Aug 15 16:16:53 BST 2022
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)
Thanks,
John
More information about the PyQt
mailing list