Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqstylekitdelegatecontainer_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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// Qt-Security score:significant reason:default
4
5#ifndef QQSTYLEKITDELEGATECONTAINER_P_H
6#define QQSTYLEKITDELEGATECONTAINER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick/qquickitem.h>
20#include <QtQml/qqmlparserstatus.h>
21
22QT_BEGIN_NAMESPACE
23
24class QQStyleKitDelegateProperties;
25
27{
28 Q_OBJECT
29 Q_PROPERTY(QQStyleKitDelegateProperties *delegateStyle READ delegateStyle WRITE setDelegateStyle NOTIFY delegateStyleChanged FINAL)
34
35public:
38
39 QQStyleKitDelegateProperties *delegateStyle() const;
40 void setDelegateStyle(QQStyleKitDelegateProperties *delegateProperties);
41
42 QObject *quickControl() const;
43 void setQuickControl(QObject *control);
44
46 bool usingDefaultDelegate() const;
47
53
54protected:
56 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
57
58private:
59 void updateImplicitSize();
60 void maybeCreateDelegate();
61 void maybeCreateShadow();
62
63private:
64 QPointer<QQStyleKitDelegateProperties> m_delegateProperties;
65 QPointer<QObject> m_control;
66
67 QPointer<QQuickItem> m_delegateInstance;
68 QPointer<QQuickItem> m_shadowInstance;
69
70 QPointer<QQmlComponent> m_delegateComponent;
71 QPointer<QQmlComponent> m_shadowComponent;
72
73 bool m_inGeometryChange = false;
74
75 static QQmlComponent *s_defaultDelegateComponent;
76 static QQmlComponent *s_defaultShadowComponent;
77};
78
79QT_END_NAMESPACE
80
81#endif // QQSTYLEKITDELEGATECONTAINER_P_H
QQStyleKitDelegateProperties * delegateStyle() const
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setDelegateStyle(QQStyleKitDelegateProperties *delegateProperties)
Combined button and popup list for selecting options.