Results 1 to 4 of 4

Thread: Doubt regarding QResource

  1. #1
    Join Date
    Jan 2010
    Posts
    95
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Doubt regarding QResource

    Hi,

    bool QResource::registerResource ( const QString & rccFileName, const QString & mapRoot = QString() )

    The function is mentioned in under QResource. I have used the function without the 2nd parameter.
    Can some one suggest the importance of the 2nd parameter "const QString & mapRoot = QString() " and how is it possible to use it.

    Any pointers would be of great help.
    Thanks

  2. #2
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Doubt regarding QResource

    Think namespace.
    Qt Code:
    1. QResource::registerResource ( "skin_plugin.rcc", "skin") ;
    2. QImage image1(":/skin/image1.png");
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Jan 2010
    Posts
    95
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Doubt regarding QResource

    Hi,

    I managed to understand how to use it... But cant understand how useful this is.

    Any pointers regarding this would be of great help.

    Regards...

  4. #4
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Doubt regarding QResource

    Am I answering some kind of a test question?

    The usefulness is the same as having folders in your filesystem. Otherwise all files would end up in one place and no two files could have the same name.

Similar Threads

  1. QResource Stopped Working
    By JPNaude in forum Qt Programming
    Replies: 0
    Last Post: 22nd October 2008, 12:26
  2. qresource file alias problem with svg
    By giotto in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2008, 15:59
  3. doubt
    By AnithaRagupathy in forum Qt Programming
    Replies: 1
    Last Post: 8th February 2008, 06:06
  4. QResource dinamic append resource on run app
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 27th November 2006, 19:30
  5. QT 4.1 in OSX I have a doubt
    By askot in forum Installation and Deployment
    Replies: 9
    Last Post: 25th February 2006, 06:14

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.