Skip to content

Commit f5ef14d

Browse files
committed
Merge branch 'master' of https://github.com/kernel-coder/QtJson
2 parents c07b2af + e862c45 commit f5ef14d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ Only to Qt5
1313
How to Use?
1414
======
1515
1) Include the QtJson.pri file into your pro file
16-
2) Create your class inhering the JObject class
16+
17+
2) Create your class inheriting the JObject class
18+
1719
3) Your class's default constructor shuold be marked with Q_INVOKABLE
20+
1821
4) Add properties to your class using the 3 macros -- MetaPropertyPublicSet, MetaPropertyPublicSet_Ptr, MetaPropertyPublicSet_Ptr_List -- this way you will see getter/setter with the same name as your property name you said in the MetaPropertyPublicSet* macro.
19-
i) Use MetaPropertyPublicSet to declare properites of built-in types (QString, int and such, that is, all the types in QMetaType::Type enum)
20-
ii) Use MetaPropertyPublicSet_Ptr to declare property of your other JObject base custom types.
21-
iii) Use MetaPropertyPublicSet_Ptr_List to declare property of list type of your other JObject base custom types. You will see a append<PropertyName> method in the class to append an item in the list of that particular type.
22+
23+
i) Use MetaPropertyPublicSet to declare properites of built-in types (QString, int and such, that is, all the types in QMetaType::Type enum)
24+
25+
ii) Use MetaPropertyPublicSet_Ptr to declare property of your other JObject base custom types.
26+
27+
iii) Use MetaPropertyPublicSet_Ptr_List to declare property of list type of your other JObject base custom types. You will see a append<PropertyName> method in the class to append an item in the list of that particular type.
28+
29+
2230
See the test project in test directory for a bit more details.
2331

2432

0 commit comments

Comments
 (0)