Thank you
I got the solution
What i did...
1) I have changed the prefix in .qrc file to ( Images )
2) Then Added the images.png files from folder ( Images ) to .qrc file.
3) Added the auto-generated "MyResourcefile.cpp" to Generated files in SolutionExplorer ( VC++ Editor )
4) In coding ...
QAction* actNew_1
= new QAction( QIcon(":Images/Resources/glass_numbers_0.png") ,
"&New File ..",
this);
QAction* actNew_1 = new QAction( QIcon(":Images/Resources/glass_numbers_0.png") , "&New File ..", this);
To copy to clipboard, switch view to plain text mode
5) In "MyRsourcefile.qrc" which is added in Resource Files ( In Solution Explorer )
[HTML]
+ /Images
|_____Resources/ImageOne.png
|_____Resources/ImageTwo.png
|_____Resources/ImageThree.png
[/HTML]
NB: I think the benefit from using Resources files is..........
1) if you are loading image directly from Imgae folder to coding ,and suppose the imageOne.png is missing in folder , UI will not able to locate the image.
2) While using resource file , Even if the Imageone.png is missing from Image-Folder , the UI will get he image as it is added in the resources. Is it right or not ...???
Bookmarks