1
0

VirtualKeyboardLoader.qml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import QtQuick 2.15
  2. import QtQuick.VirtualKeyboard 2.15
  3. import QtQuick.VirtualKeyboard.Settings 2.15
  4. Item {
  5. id: keyboardLoader
  6. // Configure keyboard settings
  7. Component.onCompleted: {
  8. // Set keyboard style (can be "default", "retro", etc.)
  9. VirtualKeyboardSettings.styleName = "default"
  10. // Set available locales (languages)
  11. VirtualKeyboardSettings.activeLocales = ["en_US"]
  12. // Enable word candidate list
  13. VirtualKeyboardSettings.wordCandidateList.enabled = true
  14. // Set keyboard height (as percentage of screen)
  15. VirtualKeyboardSettings.fullScreenMode = false
  16. }
  17. InputPanel {
  18. id: inputPanel
  19. z: 99999
  20. y: window.height
  21. anchors.left: parent.left
  22. anchors.right: parent.right
  23. states: State {
  24. name: "visible"
  25. when: inputPanel.active
  26. PropertyChanges {
  27. target: inputPanel
  28. y: window.height - inputPanel.height
  29. }
  30. }
  31. transitions: Transition {
  32. from: ""
  33. to: "visible"
  34. reversible: true
  35. ParallelAnimation {
  36. NumberAnimation {
  37. target: inputPanel
  38. property: "y"
  39. duration: 250
  40. easing.type: Easing.InOutQuad
  41. }
  42. }
  43. }
  44. }
  45. }