[Qt-interest] How install shortcuts for multiple widgets?
Frederic Tingaud
tingaud at gostai.com
Wed Feb 9 13:39:38 CET 2011
Le 09/02/2011 13:28, Oliver.Knoll at comit.ch a écrit :
> But from what I understand the OP has a different use case: there are several editors, and depending which editor has the focus pressing CTRL + S should trigger the "Save action" specific to that editor, or in other words: what needs to be saved is depending on the editor and is /different/ (not the same document to be saved) each time!
Yes, that is also what I understand.
> My educated guess would be that this "shortcut context" thing might only work between "dialog and main windows", but not between common QWidgets?
>
From what I remember, but I could be wrong, context works well if you
have for example two dock widgets at the same level. With a main window
and a dock widget, however, I would like the shortcut of the main window
to work when any child of the main window except the dock that redefines
my shortcut has the focus, and I couldn't find a way to do this with the
context.
--
-------------------------------------------------------------------------------
Frederic TINGAUD
-------------------------------------------------------------------------------
More information about the Qt-interest-old
mailing list