diff options
Diffstat (limited to 'src/quick/doc/snippets/qml/item/childrenRect.qml')
-rw-r--r-- | src/quick/doc/snippets/qml/item/childrenRect.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/quick/doc/snippets/qml/item/childrenRect.qml b/src/quick/doc/snippets/qml/item/childrenRect.qml new file mode 100644 index 0000000000..750a6fa125 --- /dev/null +++ b/src/quick/doc/snippets/qml/item/childrenRect.qml @@ -0,0 +1,21 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick + +//! [local] +Item { + x: 50 + y: 100 + + // prints: QRectF(-10, -20, 30, 40) + Component.onCompleted: print(childrenRect) + + Item { + x: -10 + y: -20 + width: 30 + height: 40 + } +} +//! [local] |