Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Apr 12, 2024
1 parent 0ab315e commit 44f7948
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion example/src/singleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ private: \
public: \
static Class* getInstance() { \
return Singleton<Class>::getInstance(); \
} \
}
6 changes: 3 additions & 3 deletions example/src/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \
} \
private: \
TYPE _##M; \
TYPE _##M;

#define Q_PROPERTY_AUTO(TYPE, M) \
Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed) \
Expand All @@ -30,7 +30,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \
} \
private: \
TYPE _##M; \
TYPE _##M;


#define Q_PROPERTY_READONLY_AUTO(TYPE, M) \
Expand All @@ -47,4 +47,4 @@ Q_PROPERTY(TYPE M READ M NOTIFY M##Changed FINAL)
return _##M; \
} \
private: \
TYPE _##M; \
TYPE _##M;
6 changes: 1 addition & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ if (QT_VERSION VERSION_GREATER_EQUAL "6.2")
RESOURCE_PREFIX "/qt/qml"
)
else ()
#加快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)
qt_add_resources(QRC_RESOURCES Qt5/imports/fluentui.qrc)
#如果是Qt6.2版本以下,则使用add_qmlplugin函数添加资源文件,这是个自定义的函数,详情见.cmake/QmlPlugin.cmake
include(QmlPlugin)
add_qmlplugin(${PROJECT_NAME}
Expand Down
2 changes: 1 addition & 1 deletion src/singleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ private: \
public: \
static Class* getInstance() { \
return Singleton<Class>::getInstance(); \
} \
}
6 changes: 3 additions & 3 deletions src/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \
} \
private: \
TYPE _##M; \
TYPE _##M;

#define Q_PROPERTY_AUTO(TYPE, M) \
Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed) \
Expand All @@ -30,7 +30,7 @@ Q_PROPERTY(TYPE M MEMBER _##M NOTIFY M##Changed)
return _##M; \
} \
private: \
TYPE _##M; \
TYPE _##M;


#define Q_PROPERTY_READONLY_AUTO(TYPE, M) \
Expand All @@ -47,4 +47,4 @@ Q_PROPERTY(TYPE M READ M NOTIFY M##Changed FINAL)
return _##M; \
} \
private: \
TYPE _##M; \
TYPE _##M;

0 comments on commit 44f7948

Please sign in to comment.