toggle to show keyboard in the right orientation
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.VirtualKeyboard
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Window {
|
||||
id: root
|
||||
@@ -14,15 +16,18 @@ Window {
|
||||
anchors.centerIn: parent
|
||||
// Rotate 90 degrees clockwise around transformOrigin
|
||||
rotation: 90
|
||||
// The rotated content
|
||||
|
||||
ColumnLayout {
|
||||
id: column
|
||||
anchors.centerIn: parent
|
||||
|
||||
Text {
|
||||
text: qsTr("Hello World")
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
RoundButton {
|
||||
text: "Show keyboard"
|
||||
onClicked: {
|
||||
Qt.quit();
|
||||
inputPanel.active = !inputPanel.active
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,15 +36,15 @@ Window {
|
||||
id: inputPanel
|
||||
z: 99
|
||||
x: 0
|
||||
y: root.height
|
||||
width: root.width
|
||||
y: parent.height
|
||||
width: parent.width
|
||||
|
||||
states: State {
|
||||
name: "visible"
|
||||
when: inputPanel.active
|
||||
PropertyChanges {
|
||||
target: inputPanel
|
||||
y: root.height - inputPanel.height
|
||||
y: parent.height - inputPanel.height
|
||||
}
|
||||
}
|
||||
transitions: Transition {
|
||||
@@ -55,4 +60,5 @@ Window {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user