Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.1
-
None
-
* Qt 5.9.1 MSVC32
* Windows 10
-
19976fd5db1f2fb4925831c5f7a708c090e4a70e (qt/qtquickcontrols2/5.14)
Description
I want to receive a key-pres events from an items which are children of SwipeView or another element, derived from Container item.
This code does not work as expected:
import QtQuick 2.7 import QtQuick.Controls 2.0 ApplicationWindow { visible: true width: 1020 height: 700 SwipeView { anchors.fill: parent focus: true Rectangle { focus: true // makes not sense color: "red" Keys.onPressed: console.log("on rect1 press: " + event.key) } Rectangle { focus: true // makes not sense color: "green" Keys.onPressed: console.log("on rect2 press: " + event.key) } Keys.onPressed: console.log("on swipe view press: " + event.key) } }
I do not see debuging output for "on rect1 press" or "on rect2 press". I see only outputs "on swipe view press".