ui: Use one web view per tab (#825)

This change stops practice of sharing a single web view
between tabs.
This commit is contained in:
Oleg Shparber
2017-11-25 15:19:53 +02:00
committed by Jerzy Kozera
parent 4ba5512411
commit 5b9fed94db
6 changed files with 169 additions and 150 deletions
+5
View File
@@ -25,6 +25,8 @@
#include "../mainwindow.h"
#include <core/application.h>
#include <QApplication>
#include <QWebFrame>
#include <QWheelEvent>
@@ -34,6 +36,9 @@ using namespace Zeal::WidgetUi;
WebView::WebView(QWidget *parent) :
QWebView(parent)
{
setAttribute(Qt::WA_AcceptTouchEvents, false);
page()->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
page()->setNetworkAccessManager(Core::Application::instance()->networkManager());
}
int WebView::zoomLevel() const