#ifndef WINDOWLIFECYCLE_H #define WINDOWLIFECYCLE_H #include #include #include #include #include #include /** * @brief The WindowLifecycle class */ class WindowLifecycle : public QObject { Q_OBJECT QML_NAMED_ELEMENT(WindowLifecycle) public: explicit WindowLifecycle(QObject *parent = nullptr); Q_INVOKABLE void onCompleted(QQuickWindow* window); Q_INVOKABLE void onDestruction(); Q_INVOKABLE void onVisible(bool visible); Q_INVOKABLE void onDestoryOnClose(); Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path); private: QQuickWindow* _window; }; #endif // WINDOWLIFECYCLE_H