mirror of
https://gitee.com/spark-store-project/spark-web-app-runtime.git
synced 2025-12-15 03:22:05 +08:00
fix: 修复部分网页无法正常跳转的问题
对于网页打开方式为新窗口打开的网页进行修复
This commit is contained in:
21
spark-webapp-runtime/webengineview.h
Normal file
21
spark-webapp-runtime/webengineview.h
Normal 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
|
||||
Reference in New Issue
Block a user