AlvaroSantisteban
AlvaroSantisteban

Reputation: 5336

Does Qt Resources system support having files just for testing?

I already used the Resources from Qt to add a couple of icons to the menu and works great, but now I was wondering if it would be possible to add a file that I need to use as a reference for testing purposes.

Therefore, I would like this file to be accesible just when I´m running the tests, not that it gets added to the binary of the application. Is there any way to set that differentiation?

I did not find something like that in Qt´s documentation.

Upvotes: 1

Views: 159

Answers (1)

andrea.marangoni
andrea.marangoni

Reputation: 1499

You can do it programmatically using QResource.

Or maybe writing on the .pro file (i have not tried it!! ) :

  Debug:RESOURCES += resources_only_debug_mode.qrc

more information here : Qt .pro Docs

Upvotes: 4

Related Questions