fix: 修复部分网页无法正常跳转的问题

对于网页打开方式为新窗口打开的网页进行修复
This commit is contained in:
ut003880
2021-07-22 12:44:49 +08:00
parent f6542879de
commit 2f38b9dd76
8 changed files with 60 additions and 56 deletions

View File

@@ -0,0 +1,21 @@
#ifndef WEBENGINEVIEW_H
#define WEBENGINEVIEW_H
#include <QWebEngineView>
class WebEngineView : public QWebEngineView
{
Q_OBJECT
public:
explicit WebEngineView(QWidget *parent = nullptr);
protected:
QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
private slots:
void on_urlChanged(QUrl url);
};
#endif // WEBENGINEVIEW_H