[iOS] QFile from qrc file



  • Hi everyone,

    Here is the problem I'm facing:

    In one library I have a resources.qrc that holds one svg file.

    I have an app that statically link against that previous library.

    From that app I make a call to the library that opens the svg file using QFile file( ":/images/logo.svg" ).
    "images/logo.svg" is the alias of the file.

    On OS X this works perfectly but on iOS it can not open the file ( file does not exists ).

    What am I doing wrong there ?

    Thanks.



  • Hi,

    I don't have any experience with iOS development bu I would like to make a sugestion about your problem.

    Qt's rcc (resource compiler) tool is run by qmake when you build an application or library which has an associated qrc file so that the resources are compiled in the app/library.

    You can compare the console outputs when you build for the desktop and for iOS and make sure that rcc is run in both cases. If it is not run for iOS, you should file a bug report on the bug tracker.

    if you compile your projects in Qt Creator, you can look at the Compile Output window.



  • Hi,

    Thanks for your answer,

    I build the library with CMake and so rcc run when compiling ( using qt5_add_resources and adding sources file generated to the library sources file )

    So it does not seem to come from there



  • I think this is known "bug":https://bugreports.qt.io/browse/QTBUG-39835.



  • This looks like the issue I'm having. I'm running Qt5.3.2 though


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.