#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::MainWindow(QWidget *parent
){
ui->setupUi(this);
connect(ui->webView, SIGNAL(loadFinished(bool)), this, SLOT(load()));
QWebPage *page = ui->webView->page();
QWebHistory *history = page->history();
history->setMaximumItemCount(0);
QWebSettings *settings = ui->webView->settings();
settings->setMaximumPagesInCache(0);
settings->setObjectCacheCapacities(0, 0, 0);
settings->setIconDatabasePath("");
settings->setAttribute(QWebSettings::JavascriptEnabled, true);
settings->setAttribute(QWebSettings::PluginsEnabled, true);
settings->setAttribute(QWebSettings::AutoLoadImages, true);
settings->setAttribute(QWebSettings::JavaEnabled, false);
settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
settings->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
settings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, false);
ui
->webView
->setUrl
(QUrl("http://<url>"));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::load()
{
ui
->webView
->setUrl
(QUrl("http://<url>"));
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindowClass)
{
ui->setupUi(this);
connect(ui->webView, SIGNAL(loadFinished(bool)), this, SLOT(load()));
QWebPage *page = ui->webView->page();
QWebHistory *history = page->history();
history->setMaximumItemCount(0);
QWebSettings *settings = ui->webView->settings();
settings->setMaximumPagesInCache(0);
settings->setObjectCacheCapacities(0, 0, 0);
settings->setIconDatabasePath("");
settings->setAttribute(QWebSettings::JavascriptEnabled, true);
settings->setAttribute(QWebSettings::PluginsEnabled, true);
settings->setAttribute(QWebSettings::AutoLoadImages, true);
settings->setAttribute(QWebSettings::JavaEnabled, false);
settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
settings->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
settings->setAttribute(QWebSettings::JavascriptCanAccessClipboard, false);
ui->webView->setUrl(QUrl("http://<url>"));
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::load()
{
ui->webView->setUrl(QUrl("http://<url>"));
}
To copy to clipboard, switch view to plain text mode
Bookmarks