import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Window 2.0 ApplicationWindow { title: qsTr("Hello World") width: 640 height: 480 TextArea { id: textArea frameVisible: false anchors.fill: parent textFormat: Qt.RichText Keys.onPressed: { console.log(event.text); } Component.onCompleted: forceActiveFocus() } }