HTML5 from Resource
-
Hi
I'd like to protect my HTML5 application's html file by loading it from a resource file "foo.qrc"
@
<RCC>
<qresource prefix="/">
<file>index.html</file>
</qresource>
</RCC>
@
My Code:@ QFile f(":/index.html");
if (f.open(QIODevice::ReadOnly))
{
qDebug() << "OK";
qDebug() << f.readAll();
}
else
{
qDebug() << "Failed";
}viewer.loadFile(":/index.html");
return app.exec();
}
@
Now my QFile part with the qdebug returns the content of my HTML file, my qrc file and my syntax is ok, but my viewer doesn't load it, it's just a plain white page, and when i click reload on the pop-up menu my app crashes...