Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. External resource in pro file
Forum Update on Monday, May 27th 2025

External resource in pro file

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.1k Views
  • 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 Offline
    H Offline
    Hostel
    wrote on 7 Jan 2012, 16:37 last edited by
    #1

    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
    0
    • G Offline
      G Offline
      goetz
      wrote on 7 Jan 2012, 23:54 last edited by
      #2

      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
      0
      • H Offline
        H Offline
        Hostel
        wrote on 8 Jan 2012, 10:54 last edited by
        #3

        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
        0

        2/3

        7 Jan 2012, 23:54

        • Login

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