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. How to use a compress Resource file

How to use a compress Resource file

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 4.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.
  • H Offline
    H Offline
    hoozi
    wrote on last edited by
    #1

    hi,

    I use rcc like this
    @rcc -binary xrc.qrc -o xrc.rcc@
    then
    @qDebug()<< QResource::registerResource("xrc.rcc");@
    it's work fine.

    but, when I use -compress options
    @rcc -binary -threshold 0 -compress 2 xrc.qrc -o xrc2.rcc@

    registerResource Failed!!! return false

    why? QT does not automatically extract it?

    someone can give some Example for use a compress Resource file , thanks!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Resource files are already compressed by default. Is there a reason you need to change the default compression levels?

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        I just tested it with your command line options. Both resources are loaded without any problems.

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

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hoozi
          wrote on last edited by
          #4

          sorry, sorry!!! I am so stupid

          a Absurd Mistakes...

          ................................forget copy xrc2.rcc to Shadow build Directory &#$*!^#%!#

          Really embarrassing..........

          [quote author="mlong" date="1312921299"]Resource files are already compressed by default. Is there a reason you need to change the default compression levels?
          [/quote]

          by default , Resource file are not compressed. you can use Text editor view the rcc file, Judge the resource file whether compressed.

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

            [quote author="hoozi" date="1312951323"]
            by default , Resource file are not compressed. you can use Text editor view the rcc file, Judge the resource file whether compressed.

            [/quote]

            See http://doc.qt.nokia.com/4.7/resources.html#compression

            Software Engineer
            My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

            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