Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML VirtualKeyboard - Overlapping area auto scrolling
Forum Updated to NodeBB v4.3 + New Features

QML VirtualKeyboard - Overlapping area auto scrolling

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 291 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nsourl
    wrote on last edited by
    #1

    Hi,

    I want to use the Qt VirtualKeyboard in QML and specifically, I tried this source code attached below. But some TextFields are not visible under the keyboard layout as shown in the images.

    So, any idea how to make the overlapping area auto-scroll only for the non-visible contents?

    Thanks!

    import QtQuick 2.15
    import QtQuick.Window 2.15
    import QtQuick.Controls 2.15
    import QtQuick.VirtualKeyboard 2.15
    
    Window {
        id: window
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        Column {
            id: col
            spacing: 10
            anchors.centerIn: parent
    
            Label {
                id: lbl
                text: "Input Text 1"
                color: "black"
            }
    
            TextField {
                id: input
                text: ""
            }
    
            Label {
                id: lbl2
                text: "Input Text 2"
                color: "black"
            }
    
            TextField {
                id: input2
                text: ""
            }
    
            Label {
                id: lbl3
                text: "Input Text 3"
                color: "black"
            }
    
            TextField {
                id: input3
                text: ""
            }
    
            Label {
                id: lbl4
                text: "Input Text 4"
                color: "black"
            }
    
            TextField {
                id: input4
                text: ""
            }
    
            Label {
                id: lbl5
                text: "Input Text 5"
                color: "black"
            }
    
            TextField {
                id: input5
                text: ""
            }
        }
    
    
        InputPanel {
            id: inputPanel
            z: 99
            x: 0
            y: window.height
            width: window.width
    
            states: State {
                name: "visible"
                when: inputPanel.active
                PropertyChanges {
                    target: inputPanel
                    y: window.height - inputPanel.height
                }
            }
            transitions: Transition {
                from: ""
                to: "visible"
                reversible: true
                ParallelAnimation {
                    NumberAnimation {
                        properties: "y"
                        duration: 250
                        easing.type: Easing.InOutQuad
                    }
                }
            }
        }
    }
    

    textfields.png textfields_nonvisible.png

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved