Closed mneilly closed 1 month ago
Hey, so the QmlModule::qrc_files
is for setting up QML modules similar to qt_add_qml_module
, so they end up in qrc:/qt/qml/<uri>
.
Instead maybe CxxQtBuilder::qrc
might be closer ? As this is similar to qt_add_resources
or adding a resource to the executable ?
https://docs.rs/cxx-qt-build/latest/cxx_qt_build/struct.CxxQtBuilder.html#method.qrc
Note that this would be similar to this test i was adding here https://github.com/KDAB/cxx-qt/pull/981/files
Otherwise if you are using a CMake build and not a Cargo one you can always add it in the normal way.
Let us know if that works or not !
Also note that the build system being changed which should improve / fix things like Qt resource initialisation which required things like WHOLE_ARCHIVE before. So if qrc
doesn't work it might work soon :-)
As of #986 Adding qrc files should now be fully supported, which should allow you to place the config at the required location.
Per Supported Environment Variables in Qt Quick Controls, the expected location of qtquickcontrols2.conf is ":/qtquickcontrols2.conf".
If I add qtquickcontrols2.conf to qrc_files it is placed per uri.
Is there a way to force a file to be placed at the root of the application resources? I would like to avoid being required to set QT_QUICK_CONTROLS_CONF to a file system location. It does not appear to accept qrc paths or I could force the env to be set in main.rs before creating the Qt application.