Hi,
i think you can use smt like:
Code:
page()->mainFrame()->load(QUrl("file:///c:/Data/webPage.html"));
to load a web page, stored on your file system, into QWebView object(or rather into QWebFrame object).
If you want to load a page created in runtime:
Code:
QString h=QString("<>html....<>");
page()->mainFrame()->setHtml(h);
Or even you can use qt resources system:
Code:
QResource res(":/index.html");
QByteArray html((const char*)res.data(), res.size());
QString h=QString(html);
page()->mainFrame()->setHtml(h);
It will load a page and set html contents as given in QString object. The only problem using resources system is i can not make working css styles sheets and java script functions from other files... It works only when page is loaded using load() method, using qt resources system i can see only html contents form setHtml() method, but no css or js sripts from other files are loaded
.
Does anyone can help us here and tell how can we use html, css and js data from qt resources system stored in separate files?
Regards
Pawel