kib2
28th June 2008, 13:47
Hi,
Im using PyQt, but it's a genral Qt4 question.
In an old app (PyQt4.3), I used this to make a shortcut on the "Tab" key with:
QtGui.QShortcut(QtGui.QKeySequence("Tab"), self.texteditor, self.doSomething)
Now, it doesn't work anymore in v4.4 (are there any changes about that behaviour ?), ie QtGui.QKeySequence("Tab") does not respond and I'm forced to use another key at the same time, like QtGui.QKeySequence("Ctrl+Tab").
So my question is simple : how do you set a shortcut on "Tab" key only ?
Thanks.
Im using PyQt, but it's a genral Qt4 question.
In an old app (PyQt4.3), I used this to make a shortcut on the "Tab" key with:
QtGui.QShortcut(QtGui.QKeySequence("Tab"), self.texteditor, self.doSomething)
Now, it doesn't work anymore in v4.4 (are there any changes about that behaviour ?), ie QtGui.QKeySequence("Tab") does not respond and I'm forced to use another key at the same time, like QtGui.QKeySequence("Ctrl+Tab").
So my question is simple : how do you set a shortcut on "Tab" key only ?
Thanks.