Why more than one files can use same alias in Qt .qrc?

863 Views Asked by At

I just tried to add same alias to the different files in Qt Resource File. I expected it couldn't be done.

But it is succeeded. Now I'm wondering how Qt knows which file to refer when ask to refer the file using alias.

And I tried to use same alias in different .qrc files too.

How it works?

Thanking you. This is just to know how it is working.

1

There are 1 best solutions below

1
On BEST ANSWER

Whilst you can add the same alias, it's probably not a good idea to do so.

Assuming you have multiple resources under the same prefix, with the same alias, I expect Qt will just provide the first resource it finds with the alias that you request.