Fix KeyInfo.text() for space

This commit is contained in:
Florian Bruhin 2018-02-26 20:48:22 +01:00
parent e9d58dae2a
commit 6fc391986f

View File

@ -263,7 +263,9 @@ class KeyInfo:
def text(self):
"""Get the text which would be displayed when pressing this key."""
text = QKeySequence(self.key).toString()
if len(text) > 1:
if self.key == Qt.Key_Space:
return ' '
elif len(text) > 1:
# Special key?
return ''