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. Virtual keyboard is covering my TextField when typing text
Forum Updated to NodeBB v4.3 + New Features

Virtual keyboard is covering my TextField when typing text

Scheduled Pinned Locked Moved QML and Qt Quick
28 Posts 7 Posters 20.9k 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.
  • S Offline
    S Offline
    strekazoid
    wrote on last edited by
    #18

    Reading the release notes about split view gives me impression that this behavior is normal and is in fact a feature. So, the only way is now for me to create additional states, one state per textfield, and adjust the view according to the vkb state?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      roopeshchander
      wrote on last edited by
      #19

      [quote author="strekazoid" date="1321433304"]I've tried adding following line to main.cpp with both true and false values. Doesn't affect the behaviour of UI in any way.
      @QCoreApplication::setAttribute(Qt::AA_S60DisablePartialScreenInputMode, false);@
      [/quote]

      The behaviour doesn't change probably because you're already using Qt Quick Components 1.1.

      [quote author="strekazoid" date="1321433543"]So, the only way is now for me to create additional states, one state per textfield, and adjust the view according to the vkb state?[/quote]

      Did you try my earlier suggestion about setting 'platformSoftwareInputPanelEnabled: true'? That should suffice if all you have is two textfields and if they're anchored to the page (not positioned absolutely).

      1 Reply Last reply
      0
      • R Offline
        R Offline
        roopeshchander
        wrote on last edited by
        #20

        Re-reading your last post gives me the impression that you prefer the earlier interface (non-split-view keyboard), where the text entry is made in a separate view altogether (something like "this":http://qtsource.files.wordpress.com/2011/05/normal_vkb.png, but with a QWERTY layout).

        If indeed that's what you want, you can just switch back to Qt Quick Components 1.0, and this split-view keyboard feature will disappear altogether. Maybe that is what you're looking for?

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cmer4
          wrote on last edited by
          #21

          Hi guys,

          I have absolute same issue (Symbian Belle) - building a registration page and the fields located in lower part of the screen start to be blocked by Input Panel (VKB).

          I went through the example provided...

          1. I use PageStackWindow and setting ‘platformSoftwareInputPanelEnabled: true’ doesn't change anything. Maybe there is something else we should do to make it work (like setting content property?)
          2. Then I tried to implement a state behavior onActiveFocusChanged. Issue is on the device the inputContext.visible param always returns false regardless of actual position. Maybe it is a bug or maybe not...

          Anyway what would be good from documentation standpoint is to provide exact examples of how PageStackWindow should be used to accomodate the feature and adjust content margins etc to make it visible...

          Funny thing is that I tried splitscreen keyboard some time ago via a workaround (read some post re this). And at that time the view WAS adjusted just like it needs to be...

          1 Reply Last reply
          0
          • R Offline
            R Offline
            roopeshchander
            wrote on last edited by
            #22

            Before I posted about setting platformSoftwareInputPanelEnabled to true, I had verified that it works in a small example. This is the QML code I used (most of it is auto-generated by Qt Creator):

            main.qml:
            @import QtQuick 1.1
            import com.nokia.symbian 1.1

            PageStackWindow {
            id: window
            initialPage: MainPage {tools: toolBarLayout}
            showStatusBar: true
            showToolBar: true
            platformSoftwareInputPanelEnabled: true

            ToolBarLayout {
                id: toolBarLayout
                ToolButton {
                    flat: true
                    iconSource: "toolbar-back"
                    onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
                }
            }
            

            }@

            MainPage.qml:
            @import QtQuick 1.1
            import com.nokia.symbian 1.1

            Page {
            id: mainPage
            Item {
            anchors.fill: parent
            TextField {
            anchors { top: parent.top; topMargin: 20; horizontalCenter: parent.horizontalCenter; }
            width: 200
            text: "Up above"
            font.pixelSize: 20
            }
            TextField {
            anchors { bottom: parent.bottom; bottomMargin: 20; horizontalCenter: parent.horizontalCenter; }
            width: 200
            text: "Down under"
            font.pixelSize: 20
            }
            }

            Rectangle {
                anchors { fill: parent; margins: 5; }
                color: "transparent"
                border.color: "blue"
            }
            

            }@

            Both text fields are always visible, irrespective of whether the virtual keyboard is shown or not. I checked this on an X7-00 running Symbian Anna with Qt 4.7.4 installed.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              strekazoid
              wrote on last edited by
              #23

              The example by roopeshchander works fine for me too.

              I've actually solved this problem this way:

              @State {
              name: "firstName"; when: inputContext.visible && nameTextfield.focus

                      PropertyChanges {
                          target: backgroundImage
                          y: -20
                      }
                  },@
              

              backgroundImage in my case is the root element for the whole page, so changing the y property will move it up. The y value actually have to be attached to the inputContext.height value, and not hardcoded.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cmer4
                wrote on last edited by
                #24

                Hi guys, I have also sorted it out in similar way to the above post. But clearly this sort of functionality should be automated.

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  roopeshchander
                  wrote on last edited by
                  #25

                  Well, it is automated. As is evident in QML code I posted earlier, it is all handled by the components as long as the items are anchored properly (i.e. anchored so that the items stay within the bounds of the page even if the page resizes).

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    ravirdv
                    wrote on last edited by
                    #26

                    I'm facing the same problem, all the items are anchored correctly. I've placed few textfields inside a flickable which resizes when VKB is visible but still it covers bottom textfields

                    I tried workaround suggest by strekazoid but even that's not working or may by I'm not doing it the correct way.

                    It would be great if some could help me.

                    thanks.

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      danielcbit
                      wrote on last edited by
                      #27

                      ravirdv, to solve this issue, use this: http://tftfy.blogspot.com/2012/02/help-virtual-keyboard-hiding-input-on.html

                      It works the same way as in Meego. With the bottom TextFields lifting up.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        aabc
                        wrote on last edited by
                        #28

                        Did you use QCoreApplication::sendEvent() ?

                        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