import QtQuick 2.5 import fbx.application 1.0 Application { property int i property string txt: "La variable i est égale à :" color: "grey" Text { focus: true anchors.centerIn: parent text: txt + " " + i color: "#" + i font.pixelSize: 40 Keys.onPressed: { if((event.key == Qt.Key_Up) && (i<999)) i++ else if((event.key == Qt.Key_Down)&&(i>0)) i-- } } }