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

qmllint --compiler spurious error: QML State AnchorChanges: with type QQuickAnchorLine to QQmlScriptString of QQmlScriptString

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.x
    • 6.3.0 Beta2
    • QML: Compiler, QML: Tooling
    • Kubuntu Linux 21.10
    • Linux/X11

      qmllint --compiler warning main2.qml

      Seems to be related to:

      https://bugreports.qt.io/browse/QTBUG-91165

      See attached: main2.qml and main2.log

       

      Code snippet from main2.qml:

                  State {
                      name: "rightState"
                      AnchorChanges {
                          target: mover
                          anchors {
                              left: undefined
                              right: main.right
                              horizontalCenter: undefined
                          }
                      }
                  }
      

       Example qmllint output:

      Warning: main2.qml:80:32: Cannot assign binding of type QQuickAnchorLine to QQmlScriptString
                              right: main.right
                                     ^^^^^^^^^^
      Warning: main2.qml:80:42: Could not compile binding for right: cannot convert from QQuickAnchorLine of QQuickItem::right with type QQuickAnchorLine to QQmlScriptString of QQmlScriptString
                              horizontalCenter: undefined
      

        1. main2.log
          4 kB
          Jeffrey Brendecke
        2. main2.qml
          2 kB
          Jeffrey Brendecke
        For Gerrit Dashboard: QTBUG-101364
        # Subject Branch Project Status CR V

            qtqmlteam Qt Qml Team User
            jbrend Jeffrey Brendecke
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: