[Interest] Routing all QML file requests through a custom resource provider

Michael Sué sue at sf.mpg.de
Mon Jun 20 10:26:27 CEST 2016


Hi,

> What does adding a qrc file to RESOURCES actually do (besides triggering resource compiler)? I'm looking for an understanding here.

Files like "relativ/path/to/qrc/file/image.png" in, say, "main.qrc“ will appear in a file "qrc_main.cpp" in binary form. Please find it in your build-tree and open it in an editor to lokk for yourself. This file ("qrc_main.cpp") gets compiled and linked to your program. You can then use files therein as e.g. ":/relativ/path/to/qrc/file/image.png" in, say, a call to QFile in your application.

- Michael.





More information about the Interest mailing list