TheIndependentAquarius
5th July 2012, 07:14
#include <QtCore>
#include <QtGui>
#include <QtWebKit>
int main (int argc, char * argv[])
{
QApplication app (argc, argv);
QUrl baseUrl = QUrl::fromLocalFile (QDir::current().absoluteFilePath ("file:///home/anisha/Desktop/ogmap.html"));
QString msg ("<html><body><img src='logo.png' /></body></html>");
QWebView *webView = new QWebView;
webView->setHtml(msg, baseUrl);
webView->show();
return app.exec();
}
This displays a small logo in the widget, nothing else. I am not interested in any logo.
When I open that html file through Konqueror/Firefox, map gets displayed.
What wrong am I doing here? I want the map to be displayed in that widget.
#include <QtGui>
#include <QtWebKit>
int main (int argc, char * argv[])
{
QApplication app (argc, argv);
QUrl baseUrl = QUrl::fromLocalFile (QDir::current().absoluteFilePath ("file:///home/anisha/Desktop/ogmap.html"));
QString msg ("<html><body><img src='logo.png' /></body></html>");
QWebView *webView = new QWebView;
webView->setHtml(msg, baseUrl);
webView->show();
return app.exec();
}
This displays a small logo in the widget, nothing else. I am not interested in any logo.
When I open that html file through Konqueror/Firefox, map gets displayed.
What wrong am I doing here? I want the map to be displayed in that widget.