qt - QML Virtual keyboard Hide button not working -


i having problem if click on keyboard hide button .following code :

import qtquick 2.6 import qtquick.window 2.2 import qtquick.controls 2.2 import qtquick.virtualkeyboard 2.2  window {     visible: true     width: 600     height: 500     title: qstr("hello world")      textfield {         id: textfield         anchors.bottom:(inputpanel.visible) ? inputpanel.top : parent.bottom         color: "#2b2c2e"         cursorvisible: activefocus         selectioncolor: qt.rgba(0.0, 0.0, 0.0, 0.15)         selectedtextcolor: color     }      inputpanel {         id: inputpanel         z: 89         anchors.bottom:parent.bottom         anchors.left: parent.left         anchors.right: parent.right          visible: qt.inputmethod.visible //** warning here       } } 

below use-cases:

  1. if click on textfield keyboard pops expected when click on hide keyboard button it's not hiding.

  2. if click on textfield keyboard pops expected, next if double-click on textfield , click on hide keyboard button it's hiding.

i getting warning :

qml inputpanel: binding loop detected property "visible"

please suggest.

the basic example shows input panel when active property true:

inputpanel {     id: inputpanel     z: 89     y: appcontainer.height     anchors.left: parent.left     anchors.right: parent.right     states: state {         name: "visible"         /*  visibility of inputpanel can bound qt.inputmethod.visible property,             handwriting input panel , keyboard input panel can visible             @ same time. here visibility bound inputpanel.active property instead,             allows handwriting panel control visibility when necessary.         */         when: inputpanel.active         propertychanges {             target: inputpanel             y: appcontainer.height - inputpanel.height         }     }     transitions: transition {         id: inputpaneltransition         from: ""         to: "visible"         reversible: true         enabled: !virtualkeyboardsettings.fullscreenmode         parallelanimation {             numberanimation {                 properties: "y"                 duration: 250                 easing.type: easing.inoutquad             }         }     }     binding {         target: inputcontext         property: "animating"         value: inputpaneltransition.running     } } 

so similar:

inputpanel {     id: inputpanel     z: 89     anchors.bottom:parent.bottom     anchors.left: parent.left     anchors.right: parent.right      visible: active } 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -