Closed EndrII closed 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
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
Can you check generated import cpp file?
That Q_IMPORT_PLUGIN
for qt svg is there?
Do you link to Qt::Svg?
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)
What is wrong ?
Qt 5.15.2