This commit is contained in:
zhuzichu 2023-11-24 15:41:44 +08:00
parent 05251e085c
commit d485ec9e3b
2 changed files with 5 additions and 16 deletions

View File

@ -20,20 +20,6 @@
#include "FluNetwork.h"
#include "QRCode.h"
int major = 1;
int minor = 0;
auto uri = "FluentUI";
FluentUI* FluentUI::m_instance = nullptr;
FluentUI *FluentUI::getInstance()
{
if(FluentUI::m_instance == nullptr){
FluentUI::m_instance = new FluentUI;
}
return FluentUI::m_instance;
}
void FluentUI::registerTypes(QQmlEngine *engine){
initializeEngine(engine,uri);
registerTypes(uri);

View File

@ -3,17 +3,20 @@
#include <QObject>
#include <QQmlEngine>
#include "singleton.h"
class FluentUI : public QObject
{
Q_OBJECT
public:
static FluentUI *getInstance();
SINGLETONG(FluentUI)
Q_DECL_EXPORT void registerTypes(QQmlEngine *engine);
void registerTypes(const char *uri);
void initializeEngine(QQmlEngine *engine, const char *uri);
private:
static FluentUI* m_instance;
const int major = 1;
const int minor = 0;
const char *uri = "FluentUI";
};
#endif // FLUENTUI_H