I have several themes folders each containing a .qrc file:
redTheme/
- File.qml
- qml.qrc
blueTheme/
- File.qml
- qml.qrc
I am currently able to switch between these themes at compile time. This means I need to change my import statement to the theme I want to use.
I would like to know if I could do this in runtime. It would give much more flexibility to the user. Example : user clicks on a Button which triggers a signal and loads another theme (from C++ or QML)
My first interrogation is : should I use .qrc files or QML Modules?
The former loads its content after being called from C++ whereas the latter compels me to use import statements.
This brings me to other questions:
- Can I use several
.qrcfiles? - If so, can I "unload" a
.qrcfile? Could be a stupid question as I'm not fully aware of the Qt Resource System mechanisms. - How would I load another
.qrcfile? I would have mymain.qrcfile loading views and mythemes.qrcfiles loading the customQMLobjects.