PDA

View Full Version : How to add alternative shortcuts in smartest way?



jmj
29th August 2010, 09:30
I want add to my program alternative shortcuts (to invoke the same actions with different shortcuts). I found documentation page:
http://doc.qt.nokia.com/4.6/qkeysequence.html
But they cover (only) how to make key sequences, with no mention about alternative keys. I suppose that adding alternative shortcuts to the QPushButton should be as easy as adding single shortcut. But for now I know that I can do alternative shortcuts only with separate QAction objects. Is in Qt smarter/easiest way?

wysota
29th August 2010, 09:36
See QShortcut and its activated() signal.