Yuhang Zhao
2023-12-21 0e9c2e428fb61953fd8f152125897646fe6fd337
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "qwkquickglobal.h"
 
#include <QtQml/QQmlEngine>
 
#include "quickwindowagent.h"
 
namespace QWK {
 
    static constexpr const char kModuleUri[] = "QWindowKit";
 
    void registerTypes(QQmlEngine *engine) {
        Q_UNUSED(engine);
 
        static bool once = false;
        if (once) {
            return;
        }
        once = true;
 
        qmlRegisterType<QuickWindowAgent>(kModuleUri, 1, 0, "WindowAgent");
        qmlRegisterModule(kModuleUri, 1, 0);
    }
 
}