Hello forum,
I have declared a Grid item to position its children in grid formation. Then I have a Rectangle item to act as a frame as follows:
Rectangle {
id: rect
color: "red"
radius: 10
opacity: 0.1
border.color: "black"
focus: true
//the rectangle element
//will fill the whole grid container
anchors.fill: controlContainer
Keys.onPressed: {
if(event.key === Qt.Key_F1)
{
console.log('Key F1 was pressed')
event.accepted = true
}
}
}
Rectangle {
id: rect
color: "red"
radius: 10
opacity: 0.1
border.color: "black"
focus: true
//the rectangle element
//will fill the whole grid container
anchors.fill: controlContainer
Keys.onPressed: {
if(event.key === Qt.Key_F1)
{
console.log('Key F1 was pressed')
event.accepted = true
}
}
}
To copy to clipboard, switch view to plain text mode
I want to apply spring animation with the key press event . In that case do I have to apply animation to rectangle only or both ?
Thanks
Bookmarks