Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40329

Qt Quick item visibility not changed when virtual keyboard is open

    XMLWordPrintable

Details

    • qtdeclarative: 29e2497a2c3d09470ad779dd1aadcefac2d4daaf

    Description

      Using the attached application you can see that Qt Quick item(Image in this case) is not drawn to the screen when visibility is changed from false --> true.

      Steps to reproduce:
      1. Launch the application
      2. Type some text

      Actual result
      2. Image is not drawn to the right side of textfield component. Image is drawn once virtual keyboard is closed.

      Expected result:
      2. Image should come to visible without closing the virtual keyboard.

      import QtQuick 2.2
      import QtQuick.Controls 1.1
      import QtQuick.Layouts 1.1
      
      ApplicationWindow {
          visible: true
          width: 300
          height: 640
          title: qsTr("Hello World")
      
          menuBar: MenuBar {
              Menu {
                  title: qsTr("File")
                  MenuItem {
                      text: qsTr("Exit")
                      onTriggered: Qt.quit();
                  }
              }
          }
          RowLayout{
              id: rowLayout
              spacing: 0
              TextField{
                  id: txtSearch
                  placeholderText: "Type the URL"
                  Layout.fillWidth: true
                  Layout.fillHeight: true
                  onTextChanged: onTextFieldTextChanged();
              }
              Image{
                  id: img
                  visible:false
                  source: "qrc:///Images/stop.png"
                  Layout.maximumHeight: rowLayout.height
                  Layout.maximumWidth: rowLayout.height
                  Layout.minimumWidth: rowLayout.height
                  Layout.minimumHeight: rowLayout.height
                  MouseArea{
                      id: mouseArea
                      anchors.fill: parent
                  }
              }
          }
          function onTextFieldTextChanged(){
              if(txtSearch.text.length>0){
                  img.visible=true;
              }else img.visible=false;
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            anylitok Antti Yli-Tokola (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes