Discussion Board

Results 1 to 8 of 8

Hybrid View

  1. #1
    Regular Contributor BalajiR's Avatar
    Join Date
    Nov 2007
    Posts
    130
    Hi I am developing Qt project and for file reading I use symbian c++ coding. Here is my code for that

    RFs iFileServer;
    User::LeaveIfError(iFileServer.Connect());
    RFile aFile;
    TInt err = aFile.Open(iFileServer,_L("file.zip"),EFileRead);

    file.zip is located in S60 private\ec45d767\file.zip and it reads the file perfectly.

    Now I have the file in my project folder resource\file1.zip and I added it in *.qrc file. I want to know how to mention this location in the above code.

    Please give the solution.

    Regards,
    Bala

  2. #2
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    Why do you need to use Symbian code for reading files in Qt application?

  3. #3
    Regular Contributor BalajiR's Avatar
    Join Date
    Nov 2007
    Posts
    130
    Quote Originally Posted by divanov View Post
    Why do you need to use Symbian code for reading files in Qt application?
    I tried to read *.zip and *.epub files using Qt code but didn't get solution or help for that. Using Symbian code I'm able to extract the files and get contents of them.

    If you know how to open epub and zip format files using Qt, then it will be very helpful for me.

    Regards,
    Bala

  4. #4
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    You still can check how Azardi does that.
    http://www.infogridpacific.com/igp/A...ion%20History/

    Qt resources are built in the binary and Symbian libraries do not have ready available solution for reading Qt resources.

  5. #5
    Regular Contributor BalajiR's Avatar
    Join Date
    Nov 2007
    Posts
    130
    Qt resources are built in the binary and Symbian libraries do not have ready available solution for reading Qt resources.
    Then could you please tell me how to use the files which are in project folder using symbian code.

  6. #6
    Regular Contributor treinio's Avatar
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329
    Quote Originally Posted by BalajiR View Post
    Then could you please tell me how to use the files which are in project folder using symbian code.
    Assuming you already know how to read the files from your application /private folder, all you need to do is to deploy the file(s) to the device - i.e. add them to the sis package.

    Try the following code in your .pro file:

    Code:
    zipFiles.sources = resource\*.zip    # assumes your files are in \resource folder
    DEPLOYMENT += zipFiles

  7. #7
    Regular Contributor treinio's Avatar
    Join Date
    Oct 2008
    Location
    Oslo, Norway
    Posts
    329
    Quote Originally Posted by BalajiR View Post
    Using Symbian code I'm able to extract the files and get contents of them.
    True, Symbian provides an API for handling zip files, namely CZipFile. But you cannot access the contents of a zip archive by using RFs/RFile classes alone.

    In Qt, there's qCompress/qUncompress, but with those it's only possible to (un)compress a stream of bytes using zlib compression methods - they cannot handle the ZIP file format directly. There are of course 3rd party libraries available that can.

Similar Threads

  1. S60_3rd_FP1 build error
    By zeynep in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2008-11-05, 07:41
  2. Error with makesis.exe and creating the .pkg file
    By gramya87 in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2007-10-10, 13:53
  3. active MMP file changes for every project
    By metalim in forum Symbian Tools & SDKs
    Replies: 9
    Last Post: 2007-02-14, 19:17
  4. Can't make sis file
    By mahg in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 11
    Last Post: 2006-04-04, 15:47
  5. Cannot add .lib file to VC6 project (Series 60 SDK)
    By ngabordh in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2004-03-25, 15:13

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved