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

Document the need to qt_extract_metatypes or qt_add_library for external libraries exposed in QML modules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.8
    • 6.7.2
    • QML: Tooling
    • None

      I have two classes: ClassA, a QML module defined with the QML_ELEMENT macro, and ClassB, a Qt object class within a separate DLL library using the Q_OBJECT macro.

      When inheritting ClassA from ClassB, a warning is generated: "Warning: ClassA.h: ClassB is used but cannot be found." The warning does not impede the execution of the program.

      My build system is CMake and Ninja.

      Note that the warning is only issued during a clean build!

      See attached demo project.

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

            qtqmlteam Qt Qml Team User
            warindy yi wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes