×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Accessing resource file at run-time

    My app needs to access/load resource files (image or xml) at run-time.
    setPixmap(QPixmap("./Images/frame2.png"));
    QFile file("./config.xml");

    I just want to know where should I put these resource files in for the emulator WINSCW. I have tried to copy resource files into the launch folder:
    \S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\release\winscw\udeb\
    But, it seems dosen't work.

    Same kind of question is how to create package (sisx) with additoinal resource files in?

    Any help? thanks
    Last edited by shudder; 2009-06-11 at 10:34. Reason: format

  2. #2
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Accessing resource file at run-time

    Welcome to Forum Nokia DiBo.

    QDir::currentPath() returns the absolute path of the application's current directory, private path. so it is better to place files at private path on device, and then get path using QDir::currentPath().

    For emulator ..\epoc32\winscw\c\private\<UID of app> is the current directory for application. so put your files there to access in emulator.

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    2

    Re: Accessing resource file at run-time

    Great help! thanks

  4. #4
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Accessing resource file at run-time

    Hi,

    You can use DEPLOYMENT variable in the .pro file to include files to the sis package.
    Code:
    symbian: {                           
        addFiles.sources = logo.bmp
        addFiles.path = .
        DEPLOYMENT += addFiles
    }
    That will add the following line into the generated pkg file

    Code:
    ; DEPLOYMENT
    "c:\symbian\Carbide\workspace\Test\logo.bmp"    - "!:\private\eff58179\logo.bmp"
    For details see:
    http://library.forum.nokia.com/topic...5-0770391632A8

    Best Regards,
    Ilkka
    Last edited by isalento; 2009-06-12 at 11:17. Reason: link fixed (hopefully)

Similar Threads

  1. MBM image is not found
    By tamhanna in forum Symbian
    Replies: 14
    Last Post: 2009-04-20, 12:44
  2. How to edit resource file (.rss) in CW 3.1
    By madsum in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 8
    Last Post: 2009-01-16, 15:00
  3. Replies: 1
    Last Post: 2005-05-26, 14:22
  4. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

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