diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2017-10-27 17:13:18 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2017-10-30 11:55:35 +0000 |
commit | 30d123e2ecf7717c7d4f2dc2dcca1856abb239d5 (patch) | |
tree | 7503e73041f2ac061602d7d1e041f7ca5087f672 /doc | |
parent | 5c5bac67a4908718812f84899568691d11dc3c16 (diff) |
Wizards: add IconListField
- reuse some code from ComboBoxField throw an abstract ListField class
- ListField can handle more data like: icon, trToolTip
- fix disabledIndex in ComboBoxField
- adjust documentation
Change-Id: I00b6ab787fb2fad97dafff32786cf73c636c772d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/projects/creator-projects-custom-wizards-json.qdoc | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/doc/src/projects/creator-projects-custom-wizards-json.qdoc b/doc/src/projects/creator-projects-custom-wizards-json.qdoc index 66cae4aa09..5073d2b2df 100644 --- a/doc/src/projects/creator-projects-custom-wizards-json.qdoc +++ b/doc/src/projects/creator-projects-custom-wizards-json.qdoc @@ -730,7 +730,10 @@ \endlist - \section2 Combo Box + \section2 List + + \note The Combo Box and Icon List types are both variations of the List type, + and therefore they can have the same properties. \code { @@ -744,19 +747,36 @@ } }, \endcode + or + \code + { + "name": "ChosenBuildSystem", + "trDisplayName": "Choose your build system:", + "type": "IconList", + "data": + { + "items": [ + { "trKey": "Qbs", "value": "qbs", "icon": "qbs_icon.png", "trToolTip": "Building with Qbs." }, + { "trKey": "QMake", "value": "qmake", "icon": "qmake_icon.png", "trToolTip": "Building with QMake." } + ] + } + }, + \endcode \list - \li \c items specifies a list of items to put into the combo box. The - list can contain both JSON objects and plain strings. For JSON - objects, define \c trKey and \c value pairs, where the \c trKey is - the list item visible to users and \c value contains the data - associated with the item. + \li \c items specifies a list of items to put into the list type. The + list can contain both JSON objects and plain strings. + For JSON objects, define \c trKey and \c value pairs, where the + \c trKey is the list item visible to users and \c value contains + the data associated with the item. + In addition, you can use \c icon to specify an icon for the list + item and \c trToolTip to specify a tooltip for it. - \li \c index specifies the index to select when the combo box is + \li \c index specifies the index to select when the list type is enabled. By default, it is set to \c 0. - \li \c disabledIndex specifies the index to show if the combo box is + \li \c disabledIndex specifies the index to show if the list type is disabled. \endlist |