Reputation: 1320
Manually hard coding html and image files using setHtml
and setContent
is tedious. Is there a way to automate this? I don't want the Qt 5.2 application to load external files.
Example:
QString content = "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"utf-8\"><title>Hello World</title></head><html><body><h1>Hello World</h1></body></html>";
QWebView view;
view.show();
view.setHtml(content,QUrl("index.html"));
Upvotes: 2
Views: 548