Android keys back.
-
import QtQuick 2.4 import QtQuick.Window 2.2 Window { visible: true id: rootItem Rectangle { anchors.fill: parent color: "lightgreen" focus: true Rectangle { id: rect focus: true width: parent.width * 2/3 height: parent.height * 2/3 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter color: "lightblue" Keys.onBackPressed: { console.log("key back 2") } } Keys.onBackPressed: { console.log("key back 1") } } }
How to get "key back 2"?
-
Hi @Trikrista
Try forwarding it. See forwardTo property. -
forward work if item.focus = true
And if I do not know what an item.focus = true?
-
@Trikrista Keep
focus
on outerRectangle
. AddforwardTo
.
Then add into the listid
of innerRectangle
.