[Qt] Using QResources

Adding a QResource to your project :

  •  Add new > Qt > Qt Resource file.

Make sure every single qrc file has been added to RESOURCES in your .pro file.

Then load every resource files added to your project in you main :

Q_INIT_RESOURCE(res);

Don’t forget that the path to a QResource has the following form “:/prefix/pathToYourResource” and that you can use aliases in your QResource file.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s