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. Binding loop detected for Input panel property "active"

Binding loop detected for Input panel property "active"

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 1.0k 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.
  • M Offline
    M Offline
    manny_lp
    wrote on last edited by
    #1

    I have text area whose height has to be adjusted based visibility of virtual keyboard.
    But when I run the application I am getting the error "QML Keyboard: Binding loop detected for property "active". Hence keyboard is not hiding.

    Test code is as follows:

    import QtQuick 2.9
    import QtQuick.Window 2.2
    import QtQuick.Controls 2.2
    import QtQuick.VirtualKeyboard 2.2

    Window {
    visible: true
    width: 1280
    height: 800
    title: qsTr("Hello World")

    property int  conclusionLength: 512
    
    
    Rectangle{
        id: conclusionField
        height: cKeyBoard.visible ? 110 : 310
        width: height
        anchors.top: parent.top
        color: "white"
        border.color: "Black"
        ScrollView{
            anchors.fill: parent
            TextArea{
                id: area
                wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
                property string previousText: text
                onLengthChanged: {
                    if(length > conclusionLength){
                        var cursor = cursorPosition;
                        text = previousText;
                        if (cursor > text.length) {
                            cursorPosition = text.length;
                        } else {
                            cursorPosition = cursor-1;
                        }
                    }
                    previousText = text
                }
            }
        }
    }
    
    InputPanel{
        id: cKeyBoard
        height: 300
        width: 1280
        visible: active
        anchors.bottom: parent.bottom
    }
    

    }

    sierdzioS 1 Reply Last reply
    0
    • M manny_lp

      I have text area whose height has to be adjusted based visibility of virtual keyboard.
      But when I run the application I am getting the error "QML Keyboard: Binding loop detected for property "active". Hence keyboard is not hiding.

      Test code is as follows:

      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.2
      import QtQuick.VirtualKeyboard 2.2

      Window {
      visible: true
      width: 1280
      height: 800
      title: qsTr("Hello World")

      property int  conclusionLength: 512
      
      
      Rectangle{
          id: conclusionField
          height: cKeyBoard.visible ? 110 : 310
          width: height
          anchors.top: parent.top
          color: "white"
          border.color: "Black"
          ScrollView{
              anchors.fill: parent
              TextArea{
                  id: area
                  wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
                  property string previousText: text
                  onLengthChanged: {
                      if(length > conclusionLength){
                          var cursor = cursorPosition;
                          text = previousText;
                          if (cursor > text.length) {
                              cursorPosition = text.length;
                          } else {
                              cursorPosition = cursor-1;
                          }
                      }
                      previousText = text
                  }
              }
          }
      }
      
      InputPanel{
          id: cKeyBoard
          height: 300
          width: 1280
          visible: active
          anchors.bottom: parent.bottom
      }
      

      }

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @manny_lp said in Binding loop detected for Input panel property "active":

      But when I run the application I am getting the error "QML Keyboard: Binding loop detected for property "active". Hence keyboard is not hiding.

      Remove the line visible: active, then.

      (Z(:^

      1 Reply Last reply
      0
      • M Offline
        M Offline
        manny_lp
        wrote on last edited by
        #3

        @sierdzio
        If it is removed, hide button will not work!

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You don't have any hide button in the QML code you posted.

          (Z(:^

          1 Reply Last reply
          0
          • M Offline
            M Offline
            manny_lp
            wrote on last edited by manny_lp
            #5

            @sierdzio
            Hide button on keyboard!

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              No idea, then, perhaps it is some QtVK thing.

              (Z(:^

              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