Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Harmattan virtual keyboard covering textfields in a listView
Forum Update on Monday, May 27th 2025

Harmattan virtual keyboard covering textfields in a listView

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 1.6k Views
  • 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.
  • I Offline
    I Offline
    Ices_Eyes
    wrote on last edited by
    #1

    As the title, is there any workaround for this?
    Here there is a simple example. I have solved the problem in Symbian by using the inputContext object, but it seems to be not available on harmattan...

    main.qml
    @import QtQuick 1.1
    import com.nokia.meego 1.1

    PageStackWindow {
    id: appWindow

    initialPage: mainPage
    
    showStatusBar: true
    
    
    MainPage {
        id: mainPage
    }
    
    ToolBarLayout {
        id: commonTools
        visible: true
        ToolIcon {
            platformIconId: "toolbar-close"
            anchors.left: (parent === undefined) ? undefined : parent.left
            onClicked: Qt.quit()
        }
        ToolIcon {
            platformIconId: "toolbar-view-menu"
            anchors.right: (parent === undefined) ? undefined : parent.right
            onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close()
        }
    }
    
    Menu {
        id: myMenu
        visualParent: pageStack
        MenuLayout {
            MenuItem { text: qsTr("Sample menu item") }
        }
    }
    

    }@

    MainPage.qml
    @
    import QtQuick 1.1
    import com.nokia.meego 1.1

    Page {
    tools: commonTools

    ListModel {
        id: contactModel
        ListElement {
            name: "Bill Smith"
            number: "555 3264"
        }
        ListElement {
            name: "John Brown"
            number: "555 8426"
        }
        ListElement {
            name: "Sam Wise"
            number: "555 0473"
        }
        ListElement {
            name: "Bill Smith"
            number: "555 3264"
        }
        ListElement {
            name: "John Brown"
            number: "555 8426"
        }
        ListElement {
            name: "Sam Wise"
            number: "555 0473"
        }
        ListElement {
            name: "Bill Smith"
            number: "555 3264"
        }
        ListElement {
            name: "John Brown"
            number: "555 8426"
        }
        ListElement {
            name: "Sam Wise"
            number: "555 0473"
        }
     }
    
    Component {
        id: contactDelegate
        Item {
            anchors.left: parent.left
            anchors.right: parent.right
            height: childrenRect.height
            Column {
                Text { text: '<b>Name:</b> ' + name }
                Text { text: '<b>Number:</b> ' + number }
                TextField {text: "Some Text"}
            }
        }
    }
    
     ListView {
         anchors.fill: parent
         model: contactModel
         delegate: contactDelegate
         highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
         focus: true
     }
    

    }
    @

    1 Reply Last reply
    0
    • I Offline
      I Offline
      Ices_Eyes
      wrote on last edited by
      #2

      Noone with an idea? Is this a so strange behavior? :S

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Ices_Eyes
        wrote on last edited by
        #3

        Ok. After some invetigations, I think I found a bug in the TextAreaHelper.js script used for repositioning the view of a flickable the input fields are in. In particular, there is this part of code into the repositionFlickable function:

        @
        case Screen.Portrait:
        if(flickableY + flickable.height - mf.width - margin < mf.x) {
        var dY = mf.x - flickableY - flickable.height
        dY += flickable.height / 2
        newContentY += dY
        } else if(flickableY + margin > mf.x){
        var dY = flickableY - mf.x
        dY += flickable.height / 2
        newContentY -= dY
        }
        break
        @

        I'm not sure on what microFocus (ms) is, but why, if the screen is in potrait, should i use the x and with values of it? By changing it with y and height, all seems to work good... :)

        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