小键盘对于qml应用是经常用到的,在qml里面,就如一个fileDialog也要自己画一样,小键盘keyboard也是要自己画的,对于相应的每个按键的clicked都要一一实现的。
这里有一个示例:
代码如下:
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Window 2.0
import QtQuick.Layouts 1.1ApplicationWindow {visible: truewidth: 700height: 480title: qsTr("Hello World")Grid{anchors.right:parent.rightanchors.rightMargin: 60anchors.top:parent.topanchors.topMargin: 20flow:Grid.LeftToRightspacing: 0width: 360height: 400clip: trueRepeater{id:numGridRepmodel:["1","2","3","","4","5","6","","7","8","9","",&