Details
-
Bug
-
Resolution: Unresolved
-
P5: Not important
-
None
-
5.11
Description
Not sure if this is actually a bug or not, but it could be possible to share the action (have e.g. a button refer to it by id) when it is declared this way, so perhaps it's worth considering.
import QtQuick 2.9 import QtQuick.Controls 2.3 import App 1.0 ApplicationWindow { width: 800 height: 800 visible: true Action { id: fooAction shortcut: "1" onTriggered: print("top-level MenuItem action triggered") } menuBar: MenuBar { Menu { title: "Menu" MenuItem { text: "Foo" // action: fooAction action: Action { id: barAction shortcut: "2" // never triggered onTriggered: print("in-place MenuItem action triggered") } } } } }