×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    How to define path for resource like image ,..etc

    using QPixmap to load image not able to specify the path properly
    QPixmap image;

    image.load(":/icon.png");
    or
    image.load("icon.png")
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  2. #2
    Registered User
    Join Date
    Mar 2006
    Location
    India
    Posts
    503

    Re: How to define path for resource like image ,..etc

    How to display an image as i am unable to display an image on widget ..
    Regards
    Kamal :)
    ------------------
    You never expect what expects you.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: How to define path for resource like image ,..etc

    Hi,

    Read that documentation about the Qt Resource Compiler and .qrc files. That compiles the images into the binary for you, then you should be able to access them using your original syntax.

    As an alternative, simple be sure to specify an absolute path and make sure you've put the image file in the appropriate place on the emulator or real device.

    Mark

Similar Threads

  1. Can i use c++ functions in Open C
    By yvsandeep in forum Open C/C++
    Replies: 16
    Last Post: 2008-11-03, 02:08
  2. Replies: 1
    Last Post: 2008-07-11, 02:32
  3. Using Icon as Image
    By korakotc in forum Symbian
    Replies: 6
    Last Post: 2006-02-13, 19:34
  4. image failed to load
    By killarkai in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2003-07-25, 13:07
  5. Replies: 0
    Last Post: 2003-05-12, 17:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×