PDA

View Full Version : QAction questions



elcuco
3rd September 2007, 17:25
Question 1:
I have this QAction in my application, and I would like to know if the user used the keyboard shortcut or the menu item to activate it. I have seen GoogleEarth doing it (with the Flight simulator), and wanted to know how to re-implement this.

Question 2:
I want to make an action, that behaves differently if "shift" is pressed when you clicked the menu item. I think KDE is doing this doe the "delete" command. Any ideas how to re-implement this in Qt4?

jpn
3rd September 2007, 18:19
Question 2:
I want to make an action, that behaves differently if "shift" is pressed when you clicked the menu item. I think KDE is doing this doe the "delete" command. Any ideas how to re-implement this in Qt4?
How about testing QApplication::keyboardModifiers() in corresponding slot?