Skip to content
Snippets Groups Projects
Commit 64914731 authored by Pouchet Pierre's avatar Pouchet Pierre
Browse files

Update main.qml

parent 89337488
No related branches found
No related tags found
No related merge requests found
......@@ -13,18 +13,31 @@ Window {
width: 300
height: 100
color: "#b93838"
focus: true
Case {
id: _case
id: case1
x: 8
y: 20
_textText: "A"
}
Case {
id: _case1
id: case2
x: 197
y: 20
_textText: "B"
}
Keys.onPressed: (event)=> {
if (event.key === Qt.Key_A) {
case1._textText = qsTr("C"); // Correcte modification
console.log(event.key + " /// " + event.text);
event.accepted = true;
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment