Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
None
-
6.8
-
8bcc0e5a0 (dev), ada09a3ea (6.9), f5d6cb48b (6.8)
-
DaVinci 109, DaVinci 110
Description
In QML when I have a property of type alias I can specify an actual property type in the \qmlproperty command:
/*!
\qmlproperty int someAlias
An alias
*/
property alias someAlias: someInt
The property will be shown as int in the documentation.
However when the property is not an alias the same doesn't work and the type as written in the code will be shown. There's a few cases in which I found myself wanting to override the automatic type.
Override var with concrete type:
/*! \qmlproperty int someInt */ property var someInt
Hide an irrelevant module prefix:
/*! \qmlproperty Action anAction An action */ property T.Action anAction
Grouped properties:
/*! \qmlproperty string icon.name \qmlproperty color icon.color A grouped property */ property IconGroup icon
In all these cases the type as spelled in the QML code is shown, not what is passed to \qmlproperty
Attachments
For Gerrit Dashboard: QTBUG-128327 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
606451,5 | qdoc: Allow overriding QML property types with \qmlproperty arguments | dev | qt/qttools | Status: MERGED | +2 | 0 |
611556,2 | qdoc: Allow overriding QML property types with \qmlproperty arguments | 6.9 | qt/qttools | Status: MERGED | +2 | 0 |
611644,2 | qdoc: Allow overriding QML property types with \qmlproperty arguments | 6.8 | qt/qttools | Status: MERGED | +2 | 0 |