This is the code with QtQuick.Controls.12.2. It displays properly but when I press Ctrl nothing happens.
I expect the print statement to execute. What am I doing wrong here?
Menu
{
title: qsTr("File")
MenuItem
{
id: new_
text: "qqq"
onTriggered:
{
console.log("saasd")
}
action:
Action
{
shortcut: "Ctrl"
onTriggered: console.log("sad0asd")
}
contentItem:
Row
{
spacing: 70
Text
{
text: new_.text
font: menuItem.font
opacity: enabled ? 1.0 : 0.3
color: menuItem.highlighted ? "#ffffff" : "#21be2b"
}
Row
{
spacing: 5
Rectangle
{
color: "blue"; height: decoration.getHeight(15); width: height
}
Text
{
text: "Ctrl"
font: menuItem.font
opacity: enabled ? 1.0 : 0.3
color: new_.highlighted ? "#ffffff" : "#21be2b"
}
}
}
}
}