#include "CReportWebView.h" #include #include #include CReportWebView::CReportWebView(QWidget *parent) : QWebEngineView(parent) { this->setContextMenuPolicy(Qt::NoContextMenu); // this->settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled,false); // this->page()->profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies); // this->page()->profile()->setHttpCacheType(QWebEngineProfile::NoCache); } QWebEngineView *CReportWebView::createWindow(QWebEnginePage::WebWindowType type) { CReportStackedWidget *StackedWidget = qobject_cast(parentWidget()); if (!StackedWidget) { return nullptr; } return StackedWidget->getView(1); }