diff options
author | Juergen Bocklage-Ryannel <juergen@ryannel.org> | 2018-03-08 20:32:38 +0100 |
---|---|---|
committer | Juergen Bocklage-Ryannel <juergen@ryannel.org> | 2018-03-08 20:32:38 +0100 |
commit | 03bf1d48d8525abf619bc3a0cf85252748f994c7 (patch) | |
tree | f087d51f274840d71cf6d2939f92523923f862d6 /docs/grammar.rst | |
parent | 170b6ca90740903c0bd3f56e803452beac1863ec (diff) | |
parent | 44e4b287efc5c314c133adb81e771b4b65efe166 (diff) | |
download | qtivi-qface-03bf1d48d8525abf619bc3a0cf85252748f994c7.tar.gz |
Merge branch 'feature/default_values' into develop
* feature/default_values:
Added default values to properties and struct fields.
adding default values to interface properties and struct members
Diffstat (limited to 'docs/grammar.rst')
-rw-r--r-- | docs/grammar.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/grammar.rst b/docs/grammar.rst index eb6546d..cb73e8d 100644 --- a/docs/grammar.rst +++ b/docs/grammar.rst @@ -268,3 +268,22 @@ Currently only brief, description, see and deprecated are supported doc tags. The QtCPP built-in generator generates valid Qt documentation out of these comments. +Default Values +============== + +QFace supports the assignment of default values to properties and struct fields. A default values is a text string +passed onto the generator. + +.. code-block:: js + + interface Counter { + int count = "0"; + Message lastMessage; + } + + struct Message { + string text = "NO DATA"; + } + +You can use quotes `'` or double-quotes `"` as a marker for text. There is no type check on qface side the +text-content is directly on to the generator. |