[PySide] A bug in the work of QKeySequence in Python 3.4
Evgeny Prilepin
esp.home at gmail.com
Thu Jul 31 14:21:10 CEST 2014
Hi all,
I have detected a bug in the work of QKeySequence class in Python 3.4. I
have found this bug only in PySide. As for PyQt4, there is no such a bug
in it.
The problem is in the wrong interpretation of key sequence that includes
such modifier combinations as "Ctrl+Shift", "Ctrl+Alt", "Shift+Alt",
"Ctrl+Shift+Alt". It should be noted that key sequence is interpreted
differently by x86 and x64 interpreters. Key sequences with only one
modifier Ctrl, Shift, Alt are interpreted correctly.
Here is an example:
>>> seq = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.SHIFT +
QtCore.Qt.Key_J)
PySide interprets this key sequence as "L" in x86 version and as "K" in
x64 version:
>>> seq.toString()
'L'
Key sequences that include only Ctrl or only Shift are interpreted
correctly:
>>> seq = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_J)
>>> seq.toString()
'Ctrl+J'
>>> seq = QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_J)
>>> seq.toString()
'Shift+J'
I repeat once again that this bug has been detected only in PySide and
only in Python 3.4
Software and its environment:
- Windows 7 x64
- Python 3.4 x86/x64
- PySide 1.2.2 (из PyPI wheels)
--
Regards,
Evgeny
More information about the PySide
mailing list