1 | // Copyright (C) 2017 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "qquickframe_p.h" |
5 | #include "qquickframe_p_p.h" |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | /*! |
10 | \qmltype Frame |
11 | \inherits Pane |
12 | //! \instantiates QQuickFrame |
13 | \inqmlmodule QtQuick.Controls |
14 | \since 5.7 |
15 | \ingroup qtquickcontrols-containers |
16 | \brief Visual frame for a logical group of controls. |
17 | |
18 | Frame is used to layout a logical group of controls together within a |
19 | visual frame. Frame does not provide a layout of its own, but requires |
20 | you to position its contents, for instance by creating a \l RowLayout |
21 | or a \l ColumnLayout. |
22 | |
23 | Items declared as children of a Frame are automatically parented to the |
24 | Frame's \l {Control::}{contentItem}. Items created dynamically need to be |
25 | explicitly parented to the contentItem. |
26 | |
27 | If only a single item is used within a Frame, it will resize to fit the |
28 | implicit size of its contained item. This makes it particularly suitable |
29 | for use together with layouts. |
30 | |
31 | \image qtquickcontrols-frame.png |
32 | |
33 | \snippet qtquickcontrols-frame.qml 1 |
34 | |
35 | \sa {Customizing Frame}, {Container Controls} |
36 | */ |
37 | |
38 | QQuickFrame::QQuickFrame(QQuickItem *parent) |
39 | : QQuickPane(*(new QQuickFramePrivate), parent) |
40 | { |
41 | } |
42 | |
43 | QQuickFrame::QQuickFrame(QQuickFramePrivate &dd, QQuickItem *parent) |
44 | : QQuickPane(dd, parent) |
45 | { |
46 | } |
47 | |
48 | #if QT_CONFIG(accessibility) |
49 | QAccessible::Role QQuickFrame::accessibleRole() const |
50 | { |
51 | return QAccessible::Border; |
52 | } |
53 | #endif |
54 | |
55 | QT_END_NAMESPACE |
56 | |
57 | #include "moc_qquickframe_p.cpp" |
58 | |