From 21472cdc51507387b4d640c28bbd7aabf194fff3 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 13 Oct 2016 14:06:55 +0200 Subject: Share Control::background notes with TextArea and TextField Change-Id: I4150dbbc272d63cd842e19a30138c9b734d260ee Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- .../doc/src/includes/qquickcontrol-background.qdocinc | 13 +++++++++++++ src/quicktemplates2/qquickcontrol.cpp | 10 +--------- src/quicktemplates2/qquicktextarea.cpp | 4 +--- src/quicktemplates2/qquicktextfield.cpp | 4 +--- 4 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc diff --git a/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc b/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc new file mode 100644 index 00000000..02d92de0 --- /dev/null +++ b/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc @@ -0,0 +1,13 @@ +//! [notes] + +\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. + +\note Most controls use the implicit size of the background item to calculate +the implicit size of the control itself. If you replace the background item +with a custom one, you should also consider providing a sensible implicit +size for it (unless it is an item like \l Image which has its own implicit +size). + +//! [notes] diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index d571a2d4..5479d3a3 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -1016,15 +1016,7 @@ void QQuickControl::setWheelEnabled(bool enabled) } \endcode - \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. - - \note Most controls use the implicit size of the background item to calculate - the implicit size of the control itself. If you replace the background item - with a custom one, you should also consider providing a sensible implicit - size for it (unless it is an item like \l Image which has its own implicit - size). + \input qquickcontrol-background.qdocinc notes \sa {Control Layout} */ diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp index dcdafe22..053e1099 100644 --- a/src/quicktemplates2/qquicktextarea.cpp +++ b/src/quicktemplates2/qquicktextarea.cpp @@ -391,9 +391,7 @@ void QQuickTextArea::setFont(const QFont &font) 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. + \input qquickcontrol-background.qdocinc notes \sa {Customizing TextArea} */ diff --git a/src/quicktemplates2/qquicktextfield.cpp b/src/quicktemplates2/qquicktextfield.cpp index f893bdb5..850bbc58 100644 --- a/src/quicktemplates2/qquicktextfield.cpp +++ b/src/quicktemplates2/qquicktextfield.cpp @@ -271,9 +271,7 @@ void QQuickTextField::setFont(const QFont &font) 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. + \input qquickcontrol-background.qdocinc notes \sa {Customizing TextField} */ -- cgit v1.2.3