basic-b2qt.qml Example File
basic/basic-b2qt.qml
import QtQuick 2.0
import QtQuick.Window 2.2
import QtQuick.VirtualKeyboard 2.2
import QtQuick.VirtualKeyboard.Settings 2.2
import "content"
Item {
width: 1280
height: 720
Item {
id: appContainer
width: Screen.width < Screen.height ? parent.height : parent.width
height: Screen.width < Screen.height ? parent.width : parent.height
anchors.centerIn: parent
rotation: Screen.width < Screen.height ? 90 : 0
Basic {
id: contentContainer
anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: inputPanel.top
handwritingInputPanelActive: handwritingInputPanel.active
}
HandwritingInputPanel {
z: 79
id: handwritingInputPanel
anchors.fill: parent
inputPanel: inputPanel
Rectangle {
z: -1
anchors.fill: parent
color: "black"
opacity: 0.10
}
}
Item {
z: 99
visible: handwritingInputPanel.enabled && Qt.inputMethod.visible
anchors { left: parent.left; top: parent.top; right: parent.right; bottom: inputPanel.top; }
HandwritingModeButton {
id: handwritingModeButton
anchors.top: parent.top
anchors.right: parent.right
anchors.margins: 10
floating: true
flipable: true
width: 76
height: width
state: handwritingInputPanel.state
onClicked: handwritingInputPanel.active = !handwritingInputPanel.active
onDoubleClicked: handwritingInputPanel.available = !handwritingInputPanel.available
}
}
InputPanel {
id: inputPanel
z: 89
y: appContainer.height
anchors.left: parent.left
anchors.right: parent.right
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: appContainer.height - inputPanel.height
}
}
transitions: Transition {
id: inputPanelTransition
from: ""
to: "visible"
reversible: true
enabled: !VirtualKeyboardSettings.fullScreenMode
ParallelAnimation {
NumberAnimation {
properties: "y"
duration: 250
easing.type: Easing.InOutQuad
}
}
}
Binding {
target: InputContext
property: "animating"
value: inputPanelTransition.running
}
AutoScroller {}
}
Binding {
target: VirtualKeyboardSettings
property: "fullScreenMode"
value: appContainer.height > 0 && (appContainer.width / appContainer.height) > (16.0 / 9.0)
}
}
}