RSS

Nokia Qt: Add and reference image resources

19 Jul

Right click the left project tree, click “Add New …”

image

 

 

 

 

 

 

 

 

 

 

 

 

Select “Qt” in the left panel, and “Qt Resource file” in the right panel

image

In the left project tree, there will be a new *.qrc file added under “Resources”  folder. Click “Add” drop box in the right panel, but you can see the “Add files” button is disabled. You must “Add prefix” before you add an image file. The prefix is something like “/Something/…”, which you might reference in code.

image

Click the “Add Prefix” button, and in this case, I simply use “/”

image

Then Add image files by clicking the “Add Files” button:

image

Browse image files in the dialog poped

image

In code, you will then be able to reference this image as shown below:

image

 
Leave a comment

Posted by on July 19, 2012 in Programming

 

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

 
%d bloggers like this: