Is it possible to define two different Resourcefiles, or can only be one current Resource File
-
Hi,
I'm using Qt5 and want to load Data from Resourcefiles.
Is it possible to define two different Resourcefiles, or can only be one current Resource File? -
It is possible to define numerous QRCs. Just be sure to avoid file name clashes.
-
But how can i use the different Files?
For Example in QML:
@
Image{
id: pic
x: 0
y: 0
z: 0
source: "qrc:/nameofalias"
}
@That does only use the resource wich is on the top of the list in .pro file.
But i tried with prefix in the different qrc files, then it works.
Example:
@
source: "qrc:/prefixofsourcetwo/nameofalias"
@Is this the right way, or is it also possible to set source for example:
@
source: "resourcefilename:/nameofalias"
@ -
I'm not sure I understand your problem. You should use prefixes. Different QRC files can use the same prefixes, too.
-
Okay, I now use prefixes and it works perfect.
Thank you for your help.
Solved.