Guest User

Example 1

a guest
Jun 25th, 2016
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.35 KB | None | 0 0
  1. Window {
  2.     visible: true
  3.     width: 640
  4.     height: 480
  5.     title: qsTr("Hello World")
  6.  
  7.     property int rightPressedCount: 0
  8.  
  9.     TextField {
  10.         focus: true
  11.  
  12.         Keys.onPressed: {
  13.             if (event.key === Qt.Key_Right) {
  14.                 console.log("Pressed")
  15.                 rightPressedCount++
  16.             }
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment