Results 1 to 7 of 7

Thread: how to acees images

  1. #1
    Join Date
    Mar 2011
    Location
    delhi
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation how to acees images

    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

  2. #2
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: how to acees images

    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.
    Oleg Shparber

  3. #3
    Join Date
    Mar 2011
    Location
    delhi
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to acees images

    yes i do as same (QImage(":/image.png"))

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how to acees images

    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?

  5. #5
    Join Date
    Mar 2011
    Location
    delhi
    Posts
    45
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to acees images

    i am using tif format file.

  6. #6
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: how to acees images

    Look at TiffIO.
    Oleg Shparber

  7. #7
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how to acees images

    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.

Similar Threads

  1. Replies: 1
    Last Post: 20th January 2011, 10:26
  2. Replies: 1
    Last Post: 16th November 2010, 17:45
  3. Images
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2009, 15:22
  4. help: about images
    By miguel_mark in forum Qt Programming
    Replies: 2
    Last Post: 8th December 2009, 07:10
  5. Replies: 4
    Last Post: 27th July 2009, 15:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.