diff --git a/src/WindowHelper.cpp b/src/WindowHelper.cpp index 4707071..964cc70 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 f5fb4f2..bc56534 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 c1df91b..5b62274 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){