OlivierLDff / QtIosCMake

📱 Deploy Qt Application for iOS with a single macro when using CMake.
BSD 3-Clause "New" or "Revised" License
58 stars 15 forks source link

Qt 5.15 qml modules is missing #26

Closed EndrII closed 2 years ago

EndrII commented 2 years ago
module "QtQuick.Controls" is not installed

What is wrong ?

Qt 5.15.2

OlivierLDff commented 2 years ago

With no more information hard to tell, but it looks like static import for the plugin are missing Have a look at QtStaticCMake

EndrII commented 2 years ago

i added your cmake module for static build and material plugin was added successful but i still has broblems with qt svg

    if (${QT_VERSION_MAJOR} EQUAL 5)

        if("${qmlRoot}" STREQUAL "")
            set(qmlRoot ${CMAKE_SOURCE_DIR})
        endif()

        qt_generate_plugin_import(${name} VERBOSE)

        # EXTRA_PLUGIN are the one required by plugin loaded by qt_generate_plugin_import
        # It's not automatic yet :( All this workflow might change in future version of qt
        # with better and better cmake support
        qt_generate_qml_plugin_import(${name}
          QML_SRC ${qmlRoot}
          EXTRA_PLUGIN
            QtQuickVirtualKeyboardPlugin
            QtQuickVirtualKeyboardSettingsPlugin
            QtQuickVirtualKeyboardStylesPlugin
            QmlFolderListModelPlugin
            QQuickLayoutsPlugin
            QSvgPlugin
          VERBOSE
        )
    endif()
qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/ToolButton.qml: QML IconImage: Error decoding: qrc:/images/private/resources/Interface_icons/offline_icon.svg: Unsupported image format
OlivierLDff commented 2 years ago

Can you check generated import cpp file? That Q_IMPORT_PLUGIN for qt svg is there? Do you link to Qt::Svg?

EndrII commented 2 years ago

Can you check generated import cpp file? That Q_IMPORT_PLUGIN for qt svg is there? Do you link to Qt::Svg?

yes. but the svg plugin is missed. i fixed my issue using qt5_import_plugins cmake function.

        qt5_import_plugins(${MY_PROJECT} INCLUDE Qt5::QSvgPlugin)