Priority: P3: Somewhat important
Affects Version/s: None
Fix Version/s: None
Component/s: Quick: Core Declarative QML
This idea is a result of
QTBUG-56562. Text copied in:
You might need to disable all of them except for certain ones. E.g. on macOS there are some shortcuts corresponding to menu items that are supposed to be still enabled while a dialog is open (an old bug which we fixed once, then it immediately got broken again and still is, AFAIK). Or, maybe the popup needs different shortcut assignments... so maybe the shortcuts need some group or category property (string? id?) which can be enabled/disabled together somehow.
Likewise I imagine in complex apps, shortcuts should be contextual. So this group or category would be diffferent in different contexts. Imagine making something like Creator: some shortcuts are valid only in the context of debugging, others only in the editor, and so on. Oops we can't call it a context though... that's an enum in Shortcut already.
Next question is how to enable/disable them declaratively. Something like (handwaving)
except that attached properties don't usually have constructor parameters like that... so I guess it has to be something different. Would be nice if it could somehow be a one-liner, though.
keeping in mind that imported components declare shortcuts... so they are not directly in scope.