From 4ab78bbababd1f6af72246a416933da6e7ff844e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 15 Apr 2023 09:45:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9registerForPageResult?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WindowHelper.cpp | 6 +++--- src/WindowHelper.h | 2 +- src/controls/FluWindow.qml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/WindowHelper.cpp b/src/WindowHelper.cpp index 47070715..964cc70e 100644 --- a/src/WindowHelper.cpp +++ b/src/WindowHelper.cpp @@ -43,9 +43,9 @@ void WindowHelper::firstUpdate(){ } -QVariant WindowHelper::createRegister(const QString& path){ - FluRegister *p = new FluRegister(this->window); - p->from(this->window); +QVariant WindowHelper::createRegister(QQuickWindow* window,const QString& path){ + FluRegister *p = new FluRegister(window); + p->from(window); p->path(path); return QVariant::fromValue(p); } diff --git a/src/WindowHelper.h b/src/WindowHelper.h index f5fb4f29..bc565345 100644 --- a/src/WindowHelper.h +++ b/src/WindowHelper.h @@ -16,7 +16,7 @@ public: Q_INVOKABLE void initWindow(QQuickWindow* window); Q_INVOKABLE void destoryWindow(); - Q_INVOKABLE QVariant createRegister(const QString& path); + Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path); Q_INVOKABLE void firstUpdate(); diff --git a/src/controls/FluWindow.qml b/src/controls/FluWindow.qml index c1df91bf..5b622741 100644 --- a/src/controls/FluWindow.qml +++ b/src/controls/FluWindow.qml @@ -87,7 +87,7 @@ ApplicationWindow { } function registerForPageResult(path){ - return helper.createRegister(path) + return helper.createRegister(window,path) } function onResult(data){