Ubuntu Pastebin

Paste from oSoMoN at Mon, 25 Jan 2016 14:59:42 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import QtQuick 2.4
import Ubuntu.Components 1.3

Item {
  TextField {
    anchors.centerIn: parent
    width: parent.width - units.gu(2)
  }
  Keys.onPressed: {
    console.log("key pressed:", event.key, event.modifiers)
    if (event.key == Qt.Key_T && event.modifiers == Qt.ControlModifier) {
      console.log("Ctrl+T pressed")
      event.accepted = true
    }
  }
}
Download as text