I'm trying to get keyboard events to my qml item that is being displayed as a texture using Scene2D. I have simply added Keys.onPressed and MouseArea to LogoControls[2] in the Scene2D example[1]. If I uncomment MouseArea, I can see the mouse click console.log message. But I never see "key pressed". Is there an extra step necessary to get Keyboard events to this item?
[1] https://doc.qt.io/qt-5/qt3d-scene2d-example.html [2] LogoControls { id: logoControls width: offscreenTexture.width height: offscreenTexture.height focus: true Keys.onPressed: { console.log("key pressed") } /*MouseArea { anchors.fill: parent onClicked: { console.log("clicked...") } }*/ }
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest