Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Using .rcc File Generated By rcc tool in qmake project

Using .rcc File Generated By rcc tool in qmake project

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
2 Posts 2 Posters 868 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.
  • S Offline
    S Offline
    Shahazan Ali
    wrote on last edited by Shahazan Ali
    #1

    Hi,

    My goal is to add a zip file in my application and use it (by extracting somewhere else in user's computer) as qt resource system. However, in .pro file, using RESOURCES variable to add a zip file in a qrc file, ends with a CPP file that compiles and eventually embeds into exe. My zip file is relatively bigger and compilation takes time. So I want to add it as binary file in my pro file. I can generate a .rcc file using the rcc tool (rcc -no-compress -binary zipfile.qrc -o zipfile.rcc). Now the question is how can I embed the zipfile.rcc into my application exe so that I can use it as qt normal resource system way.

    Note that, I can easily do that with qt5_add_binary_resources function in make, that actually embeds a binary resources into app and does not generate cop file for it. Wondering what is the make equivalent of it.

    Thanks a lot in advance!

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can load external resources using Q_INIT_RESOURCE in c++ code.

      If you mean to ask how to generate rcc file using qmake (without using RESOURCES), then it's pretty easy. For example:

      QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/rcc -no-compress -binary zipfile.qrc -o zipfile.rcc
      

      This will generate a standalone RCC file. You can also use a custom compiler for this if you want to.

      (Z(:^

      1 Reply Last reply
      3

      • Login

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