From 961d11e55f3eb1ac2e33eefd80adede01cc62622 Mon Sep 17 00:00:00 2001 From: Safiyyah Moosa Date: Wed, 26 Apr 2023 14:27:38 +0200 Subject: [PATCH] Docs: Fix "Can't link to" example warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-113160 Pick-to: 6.5 Change-Id: I49de891c36d778df5d2727f2f0703d534421e2d5 Reviewed-by: Topi Reiniƶ --- .../syntax/objectattributes.qdoc | 20 +++++++++++++++---- src/quick/doc/src/examples.qdoc | 1 - 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index d442b4f8de..4d52842e48 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -621,10 +621,22 @@ This is because the default property of \l Item is its \c data property, and any items added to this list for an \l Item are automatically added to its list of \l {Item::children}{children}. -Default properties can be useful for reassigning the children of an item. See -the \l{TabWidget Example}, which uses a default property to -automatically reassign children of the TabWidget as children of an inner -ListView. See also \l {Extending QML}. +Default properties can be useful for reassigning the children of an item. +For example: + +\qml +Item { + default property alias content: inner.children + + Item { + id: inner + } +} +\endqml + +By setting the default property \e alias to \c {inner.children}, any object +assigned as a child of the outer item is automatically reassigned as a child +of the inner item. \section3 Required Properties diff --git a/src/quick/doc/src/examples.qdoc b/src/quick/doc/src/examples.qdoc index 8fe736da54..01ed822f2c 100644 --- a/src/quick/doc/src/examples.qdoc +++ b/src/quick/doc/src/examples.qdoc @@ -102,7 +102,6 @@ Creator. \li \l{Calendar Example} \li \l{tableview/gameoflife}{TableView} \li \l{Qt Quick Examples - Text}{Text and Fonts} - \li \l{Qt Quick Examples - Toggle Switch}{Custom Toggle Switch} \endlist \enddiv \div {class="doc-column"}