Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    External resource in pro file

    General and Desktop
    2
    3
    1947
    Loading More Posts
    • 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.
    • H
      Hostel last edited by

      How can I add external resource in file? For example in pro file I have:
      @
      RESOURCES = application.qrc
      @
      Then a resource will be build-in application, but I want to use an external resource. So my problem is:
      How add resource to pro file that making a project will generate a application.rcc and copy it to binary folder? Then I would use this resource by code:
      @
      QResource::registerResource("/path/to/my/app/application.rcc");
      @

      Sorry for my eng.

      1 Reply Last reply Reply Quote 0
      • G
        goetz last edited by

        You can add the generation in a QMAKE_POST_LINK step. Or put the rcc call and the copy step into a script and add this as QMAKE_POST_LINK.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • H
          Hostel last edited by

          Thanx for reply. You confirm my idea to create a script which will run rcc and copy resource to folder with application binary. I made a prototype script in python.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post