Skip to content

Commit 0b268a8

Browse files
committed
Updating the README.md file
1 parent df0eedd commit 0b268a8

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
QtJson
1+
Overview
22
======
33

4-
Your custom class can be created with json data and vice versa!
4+
Importing json into your custom class's instance and vice versa!
5+
Json support added in Qt5. However, this utility codebase will let you import json data into you your class's instance and you can also get json from your class instance! Please take a look at the sample!
6+
7+
8+
Dependencies
9+
======
10+
Only to Qt5
11+
12+
13+
How to Use?
14+
======
15+
1) Include the QtJson.pri file into your pro file
16+
2) Create your class inhering the JObject class
17+
3) Your class's default constructor shuold be marked with Q_INVOKABLE
18+
4) Add properties to your class using the macros --
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+
See the test project in test directory for a bit more details.

0 commit comments

Comments
 (0)