mirror of
https://gitee.com/spark-store-project/spark-web-app-runtime.git
synced 2025-12-15 03:22:05 +08:00
Improve Features
Support downloading files from website directly; Show DSpinner before webpage loading progress finished.
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
#define WEBENGINEPAGE_H
|
||||
|
||||
#include <QWebEnginePage>
|
||||
#include <QWebEngineProfile>
|
||||
#include <QObject>
|
||||
#include <QProcess>
|
||||
|
||||
class WebEnginePage : public QWebEnginePage
|
||||
{
|
||||
@@ -12,8 +14,16 @@ public:
|
||||
protected:
|
||||
QWebEnginePage *createWindow(WebWindowType type) override;
|
||||
|
||||
public slots:
|
||||
void onUrlChanged(const QUrl);
|
||||
private:
|
||||
QWebEngineProfile *m_profile;
|
||||
|
||||
QProcess *process;
|
||||
|
||||
private slots:
|
||||
void on_urlChanged(const QUrl url);
|
||||
void on_download(QWebEngineDownloadItem *item);
|
||||
void on_downloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
||||
void on_downloadFinished();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user