[Qt-interest] Linux shared library can not load Qt resources? Resource initialization problem ?
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Tue Nov 30 23:09:37 CET 2010
Are you calling Q_INIT_RESOURCES ??
Scott
-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Ed Sutton
Sent: Tuesday, November 30, 2010 2:06 PM
To: Qt-interest Interest
Subject: [Qt-interest] Linux shared library can not load Qt resources?
Resource initialization problem ?
I added a Qt resource file to my shared library project. I added a
"/resource" prefix then added an XSL file to the resource. I can not
figure out how to load the resource. I found some postings about
problems with Qt resources in libraries but did not understand or find a
solution that worked. Has anyone seen this?
QString resourcePath = ":/resource/files/eot.xsl";
if( false == QFile::exists(resourcePath)
{
printf("*** Error - Resource path not found : \"%s\"\n",
resourcePath.toLatin1().data());
}
else
{
QFile::copy(resourcePath, styleSheetPathFileName))
}
// File: resources.qrc
<RCC>
<qresource prefix="/resource">
<file>files/eot.xsl</file>
</qresource>
</RCC>
Thanks in advance,
-Ed
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list