PDA

View Full Version : how to acees images



gauravg
2nd December 2011, 10:43
hi all please tell me how to access images which i have used in the project. I have a images in image folder which is used in the project and access in .qrc file. I have an exe file . when i execute that exe on the windows machine on which Qt is not installed. that images does not come when exe run. how can i asccess that images .



thanks with regards:
gauravg

Oleg
2nd December 2011, 11:11
I have a images in image folder which is used in the project and access in .qrc file.

Do you access images from .qrc in the app and not from folder (QImage(":/image.png"))?

Another reason .qrc file not correctly embedded in your app.

gauravg
3rd December 2011, 10:29
yes i do as same (QImage(":/image.png"))

Lykurg
3rd December 2011, 11:55
Are you using a png file or maybe a jpeg? Check if you have deployed the needed image format plugins. Can you post your qrc file and the actual QImage(...) you use?

gauravg
5th December 2011, 10:19
i am using tif format file.

Oleg
5th December 2011, 11:04
Look at TiffIO (http://maverick.inria.fr/Software/TiffIO/).

Lykurg
5th December 2011, 12:41
Or as said, just deploy the tiff image plugin alongside your application as it is described in the documentation on how to deploy an application.