PDA

View Full Version : Doubt regarding QResource



volcano
7th April 2010, 13:16
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

spud
7th April 2010, 13:27
Think namespace.

QResource::registerResource ( "skin_plugin.rcc", "skin") ;
QImage image1(":/skin/image1.png");

volcano
8th April 2010, 05:39
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...

spud
8th April 2010, 07:55
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.