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

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 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 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 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

        • Login

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