diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2017-09-07 11:49:16 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-07 13:37:38 +0000 |
commit | 1532a15002082486757a475d0c01b7779da3e276 (patch) | |
tree | c9884671d66d8e89cf935cffae2f0a2a7dcdcf15 | |
parent | aff417321d0aad5da462a63b103b82bc19809841 (diff) |
Settings: document how to have several categories
Change-Id: I0f27a162936015e2aeb9d52079a65b218498b50a
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r-- | src/imports/settings/qqmlsettings.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/imports/settings/qqmlsettings.cpp b/src/imports/settings/qqmlsettings.cpp index df67c04654..ae12d54f5a 100644 --- a/src/imports/settings/qqmlsettings.cpp +++ b/src/imports/settings/qqmlsettings.cpp @@ -188,6 +188,9 @@ QT_BEGIN_NAMESPACE only provides a cleaner settings structure, but also prevents possible conflicts between setting keys. + If several categories are required, use several Settings objects, each with + their own category: + \qml Item { id: panel @@ -199,6 +202,12 @@ QT_BEGIN_NAMESPACE property alias visible: panel.visible // ... } + + Settings { + category: "General" + property alias fontSize: fontSizeSpinBox.value + // ... + } } \endqml |