Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [iOS] QFile from qrc file
Forum Updated to NodeBB v4.3 + New Features

[iOS] QFile from qrc file

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MaxL
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ckakman
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MaxL
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • C Offline
          C Offline
          ckakman
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MaxL
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved