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

Change Virtual Keyboard boilperplate

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • Virtual Keyboard
    • None
    • 862a42101 (18.0)

      If one generates a Qt Quick project from QtC template with VKB enabled, then there is going to be boilerplate for InputPanel which looks like:

              states: State {
                  name: "visible"
                  when: inputPanel.active
                  PropertyChanges {
                      target: inputPanel
                      y: window.height - inputPanel.height
                  }
              }
      

      qmlls and qmllint are going to complain about how PropertyChanges is defined:

      Warning: /home/luchen/Documents/QtProjects/VKBD/Main.qml:30:20: Property "y" is custom-parsed in PropertyChanges. You should phrase this binding as "inputPanel.y: window.height..." [Quick.property-changes-parsed]
                      y: window.height - inputPanel.height
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Warning: /home/luchen/Documents/QtProjects/VKBD/Main.qml:29:25: You should remove any bindings on the "target" property and avoid custom-parsed bindings in PropertyChanges. [Quick.property-changes-parsed]
                      target: inputPanel
                              ^^^^^^^^^^
      

      In our doc, we do not recommend using "target" anymore:
      https://doc.qt.io/qt-6/qml-qtquick-propertychanges.html#target-prop

      It should be something like

                  PropertyChanges {
                      inputPanel.y: window.height - inputPanel.height
                  }
      

        For Gerrit Dashboard: QTBUG-140552
        # Subject Branch Project Status CR V

            jakoivik Jarkko Koivikko
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes