QFile file1, file2, file3;
file1.setFileName("site1.html");
file2.setFileName("site2.html");
file3.setFileName("site3.html");
QWebView webview1 = new QWebView();
webview1->setContent(file1.readAll();
QWebView webview2 = new QWebView();
webview2->setContent(file2.readAll();
QWebView webview3 = new QWebView();
webview3->setContent(file3.readAll();
//...
//if page is loaded and loadFinished(bool) signal is emitted
//...
mweb_view1->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
//...
mweb_view2->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
//...
mweb_view3->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
QFile file1, file2, file3;
file1.setFileName("site1.html");
file1.open(QIODevice::ReadOnly);
file2.setFileName("site2.html");
file2.open(QIODevice::ReadOnly);
file3.setFileName("site3.html");
file3.open(QIODevice::ReadOnly);
QWebView webview1 = new QWebView();
webview1->setContent(file1.readAll();
QWebView webview2 = new QWebView();
webview2->setContent(file2.readAll();
QWebView webview3 = new QWebView();
webview3->setContent(file3.readAll();
//...
//if page is loaded and loadFinished(bool) signal is emitted
//...
mweb_view1->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
//...
mweb_view2->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
//...
mweb_view3->page()->mainFrame()->evaluateJavaScript("$('a').each( function () { $(this).removeAttr('href'); } )");
To copy to clipboard, switch view to plain text mode
Bookmarks