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

extending-qml example is missing QtQuick dependency in CMakeLists.txt

    XMLWordPrintable

Details

    • a355c9aa33 (qt/qtdeclarative/6.4) 826cf9bb80 (qt/qtdeclarative/dev) 826cf9bb80 (qt/qtdeclarative/wip/material3) a355c9aa33 (qt/tqtc-qtdeclarative/6.4) 826cf9bb80 (qt/tqtc-qtdeclarative/dev)

    Description

      When trying out qmllint when extending QML with c++, it will fail to recognize the types that have already been exported to qml with QML_ELEMENT.

      This can be demonstrated with the 'extending-qml' example, chapter 1. If you run 'ninja all_qmllint' on that it will report this error:

      Warning: /Qt/Examples/Qt-6.4.0/qml/tutorials/extending-qml/chapter1-basics/app.qml: QQuickPaintedItem was not found. Did you add all import paths?
      Info: Did you mean "PaintedItem"?
      
      Warning: /Qt/Examples/Qt-6.4.0/qml/tutorials/extending-qml/chapter1-basics/app.qml:10:5: 'PieChart' is used but it is not resolved
          PieChart {
      

      The same happens for other base classes such as QQuickItem and QAbstractItemModel to name a few.

      Note that this happens even if the piechart sources are moved to the qml module, which they currently are not in the bundled example project.

      Attachments

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

        Activity

          People

            semih.yavuz Semih Yavuz
            knutt Knut Tidemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes