Skip to content
  • 0 Votes
    22 Posts
    4k Views
    veryqtpersonV

    I've gotten the same problem with my static build of Qt 5.15.2.

    The solution in my case (using CMake) was to call qt5_import_qml_plugins:

    get_target_property(QT_TARGET_TYPE Qt5::Core TYPE) if(${QT_TARGET_TYPE} STREQUAL "STATIC_LIBRARY") find_package(Qt5QmlImportScanner REQUIRED) qt5_import_qml_plugins(${CMAKE_PROJECT_NAME}) endif()

    Not sure what is the equivalent in Qt 6, haven't tested it myself and can't find qt6_import_qml_plugins in documentation.

    Anyway, qt5_import_qml_plugins is available only from Qt 5.14(?), so for older versions the alternative would be this external module.