Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
Description
As of Qt 6.5, the simplest way to use a big resource with a QML module – without needing Q_INIT_RESOURCE() – is as follows (credit to Mike Trahearn: https://www.linkedin.com/pulse/qt-qml-hot-tips-7-mike-trahearn )
qt_add_executable(testApp main.cpp ) qt_add_qml_module(testApp URI TestApp AUTO_RESOURCE_PREFIX # ":/qt/qml" VERSION 1.0 QML_FILES main.qml ) qt_add_resources(testApp "testApp_large_resources" PREFIX /qt/qml/TestApp BIG_RESOURCES FILES MassiveUnicodeFont.otf )
It would be nice if we could simplify it even further to something like this:
qt_add_executable(testApp main.cpp ) qt_add_qml_module(testApp URI TestApp AUTO_RESOURCE_PREFIX VERSION 1.0 QML_FILES main.qml RESOURCES MassiveUnicodeFont.otf BIG_RESOURCE )
jbornema's comment at https://bugreports.qt.io/browse/QTBUG-100268?focusedCommentId=670929&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-670929 suggests that it's preferable to have all-big or all-small, as opposed to differentiating between big resources and small resources within the same module.
Attachments
Issue Links
- relates to
-
QTBUG-104451 Auto initialize large resources
- Reported
-
QTBUG-110442 Allow settings source file properties on resources whether they need to be embedded as big resources or not
- Reported
- split from
-
QTBUG-100268 Add "big resources" support to target-based qt6_add_resources
- Closed