diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-13 18:42:41 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-10-14 11:59:14 +0000 |
commit | ddacba90c13106391c4a381a920ee462125b49ef (patch) | |
tree | 60bf5345a3c557534a3f3e857ae2c6f6bf083223 /src/templates/qquicklabel.cpp | |
parent | 918a92c866a4c37209c98e97fdb03b312d82a4d3 (diff) |
Docs: Label
Change-Id: I744f622edbc6589e9371518f82431220b667e03e
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates/qquicklabel.cpp')
-rw-r--r-- | src/templates/qquicklabel.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/templates/qquicklabel.cpp b/src/templates/qquicklabel.cpp index a977313e..efc7ee74 100644 --- a/src/templates/qquicklabel.cpp +++ b/src/templates/qquicklabel.cpp @@ -49,6 +49,25 @@ QT_BEGIN_NAMESPACE +/*! + \qmltype Label + \inherits Text + \instantiates QQuickLabel + \inqmlmodule Qt.labs.controls + \ingroup text + \brief A text label. + + Label extends \l Text with styling and \l {Control::font}{font} + inheritance. The default colors and font are style specific. Label + can also have a visual \l background item. + + \image qtlabscontrols-label.png + + \snippet qtlabscontrols-label.qml 1 + + \sa {Customizing Label} +*/ + QQuickLabel::QQuickLabel(QQuickItem *parent) : QQuickText(*(new QQuickLabelPrivate), parent) { @@ -130,6 +149,17 @@ void QQuickLabel::classBegin() #endif } +/*! + \qmlproperty Item Qt.labs.controls::Label::background + + This property holds the background item. + + \note If the background item has no explicit size specified, it automatically + follows the control's size. In most cases, there is no need to specify + width or height for a background item. + + \sa {Customizing Label} +*/ QQuickItem *QQuickLabel::background() const { Q_D(const QQuickLabel); |