Results 1 to 3 of 3

Thread: QResource registering two resources with same file names inside

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    59
    Thanked 2 Times in 2 Posts

    Default Re: QResource registering two resources with same file names inside

    Thank you this is exactly what I wanted.


    Added after 54 minutes:


    Quote Originally Posted by ChrisW67 View Post
    Then "icons:someicon.png" should look first in :/user then in :/global for someicon.png.
    I'm guessing you meant ":icons/someicon.png"

    Ah no, now I see how it works:
    http://doc.trolltech.com/latest/qdir...setSearchPaths

    But how would if my resource file has some sub folder that are also mutual, how would that work?

    For example, if both the global and the user resource files contain:
    readme.txt
    icons/logo.png
    Qt Code:
    1. QResource::registerResource ( "global.rcc", "/global" );
    2. QResource::registerResource ( "user.rcc", "/user" );
    3. QDir::setSearchPaths("resourcedata", QStringList() << ":/user" << ":/global");
    To copy to clipboard, switch view to plain text mode 

    Now to get to the (potentially overloaded) logo, do I write "resourcedata/icons:logo.png" ?
    Last edited by frankiefrank; 27th April 2011 at 11:44.

Similar Threads

  1. Accessing version resources from inside the app
    By bnilsson in forum Qt Programming
    Replies: 5
    Last Post: 27th February 2010, 18:54
  2. QtHelp Module - registering compressed help file gives error
    By Ankitha Varsha in forum Qt Programming
    Replies: 1
    Last Post: 16th May 2008, 14:14
  3. qresource file alias problem with svg
    By giotto in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2008, 15:59
  4. moc with same file names?
    By cjhuitt in forum Qt Programming
    Replies: 9
    Last Post: 27th April 2007, 20:36
  5. Reading a unicode names from a file???
    By darpan in forum Qt Programming
    Replies: 7
    Last Post: 3rd May 2006, 17:28

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.