This commit is contained in:
朱子楚\zhuzi 2024-04-12 16:50:49 +08:00
parent 0ab315e258
commit 44f7948df3
5 changed files with 9 additions and 13 deletions

View File

@ -21,4 +21,4 @@ private: \
public: \ public: \
static Class* getInstance() { \ static Class* getInstance() { \
return Singleton<Class>::getInstance(); \ return Singleton<Class>::getInstance(); \
} \ }

View File

@ -14,7 +14,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \ return _##M; \
} \ } \
private: \ private: \
TYPE _##M; \ TYPE _##M;
#define Q_PROPERTY_AUTO(TYPE, M) \ #define Q_PROPERTY_AUTO(TYPE, M) \
Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed) \ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed) \
@ -30,7 +30,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \ return _##M; \
} \ } \
private: \ private: \
TYPE _##M; \ TYPE _##M;
#define Q_PROPERTY_READONLY_AUTO(TYPE, M) \ #define Q_PROPERTY_READONLY_AUTO(TYPE, M) \
@ -47,4 +47,4 @@ Q_PROPERTY(TYPE M READ M NOTIFY M##Changed FINAL)
return _##M; \ return _##M; \
} \ } \
private: \ private: \
TYPE _##M; \ TYPE _##M;

View File

@ -143,11 +143,7 @@ if (QT_VERSION VERSION_GREATER_EQUAL "6.2")
RESOURCE_PREFIX "/qt/qml" RESOURCE_PREFIX "/qt/qml"
) )
else () else ()
#qrc qt_add_resources(QRC_RESOURCES Qt5/imports/fluentui.qrc)
set(QRC_FILE Qt5/imports/fluentui.qrc)
qt_add_big_resources(QRC_RESOURCES ${QRC_FILE})
list(APPEND QRC_RESOURCES ${QRC_FILE})
set_property(SOURCE ${QRC_FILE} PROPERTY SKIP_AUTORCC ON)
#Qt6.2使add_qmlplugin.cmake/QmlPlugin.cmake #Qt6.2使add_qmlplugin.cmake/QmlPlugin.cmake
include(QmlPlugin) include(QmlPlugin)
add_qmlplugin(${PROJECT_NAME} add_qmlplugin(${PROJECT_NAME}

View File

@ -21,4 +21,4 @@ private: \
public: \ public: \
static Class* getInstance() { \ static Class* getInstance() { \
return Singleton<Class>::getInstance(); \ return Singleton<Class>::getInstance(); \
} \ }

View File

@ -14,7 +14,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \ return _##M; \
} \ } \
private: \ private: \
TYPE _##M; \ TYPE _##M;
#define Q_PROPERTY_AUTO(TYPE, M) \ #define Q_PROPERTY_AUTO(TYPE, M) \
Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed) \ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed) \
@ -30,7 +30,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \ return _##M; \
} \ } \
private: \ private: \
TYPE _##M; \ TYPE _##M;
#define Q_PROPERTY_READONLY_AUTO(TYPE, M) \ #define Q_PROPERTY_READONLY_AUTO(TYPE, M) \
@ -47,4 +47,4 @@ Q_PROPERTY(TYPE M READ M NOTIFY M##Changed FINAL)
return _##M; \ return _##M; \
} \ } \
private: \ private: \
TYPE _##M; \ TYPE _##M;