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

Building QML module with base class header in another folder fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.8.0 Beta3
    • QML: Tooling
    • None
    • Android, iOS/tvOS/watchOS, macOS, Windows

    Description

      Building the attached example succeeds on Qt6.72 and 6.5.6 but fails on Qt6.8 beta 3. Changing to qt_standard_project_setup(REQUIRES 6.8) doesn't help.

      /MyModuleTest/build/Qt_6_8_0_for_macOS-Debug/MyModule/mymodule_qmltyperegistrations.cpp:10: error: 'IScreenMetrics.hpp' file not found
      /MyModuleTest/build/Qt_6_8_0_for_macOS-Debug/MyModule/mymodule_qmltyperegistrations.cpp:10:10: fatal error: 'IScreenMetrics.hpp' file not found
      #include <IScreenMetrics.hpp>
               ^~~~~~~~~~~~~~~~~~~~

       

      Difference seems to be that with 6.8 generated file mymodule_qmltyperegistrations.cpp includes the base class, which doesn't happen on earlier versions.

      Workaround for the build failure is to create symbolic link to module root:

      ln -s include/MyModule/IScreenMetrics.hpp IScreenMetrics.hpp 

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              tealamak Tero Alamäki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes