Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.5
- import QtQuick.Window 2.2
- import QtQuick.Controls 1.4
- Window {
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- property int rightPressedCount: 0
- Item {
- width: childrenRect.width
- height: childrenRect.height
- Keys.onPressedPreview: {
- if (event.key === Qt.Key_Right) {
- console.log("Pressed")
- rightPressedCount++
- }
- }
- TextField {
- focus: true
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement