Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickwindowcontainer_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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#ifndef QQUICKWINDOWCONTAINER_P_H
5#define QQUICKWINDOWCONTAINER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuick/private/qtquickglobal_p.h>
19
20#include <QtCore/private/qobject_p.h>
21
22#include <QtQuick/private/qquickimplicitsizeitem_p.h>
23#include <QtQuick/qquickwindow.h>
24
26
28class Q_QUICK_EXPORT QQuickWindowContainer : public QQuickImplicitSizeItem
29{
31 QML_NAMED_ELEMENT(WindowContainer)
32 Q_PROPERTY(QWindow *window READ containedWindow WRITE setContainedWindow
33 NOTIFY containedWindowChanged DESIGNABLE false FINAL)
34
36
37public:
40 ItemControlsWindow
41 };
42
43 explicit QQuickWindowContainer(QQuickItem *parent = nullptr,
44 ContainerMode containerMode = ItemControlsWindow);
46
47 QWindow *containedWindow() const;
48 void setContainedWindow(QWindow *window);
50
51protected:
52 void classBegin() override;
53 void componentComplete() override;
54
55 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
56 void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) override;
57
58 void updatePolish() override;
59
60 bool eventFilter(QObject *object, QEvent *event) override;
61
62 QRectF clipRect() const override;
63
64 void releaseResources() override;
65
66private:
67 Q_DECLARE_PRIVATE(QQuickWindowContainer)
68 friend class QQuickWindowQmlImpl;
69
70 void initializeContainedWindow();
71 void windowUpdated();
72 void syncWindowToItem();
73 void parentWindowChanged(QQuickWindow *window);
74 void windowDestroyed();
75};
76
78
79#endif // QQUICKWINDOWCONTAINER_P_H
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtCore
Definition qobject.h:103
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:144
\qmltype WindowContainer \inqmlmodule QtQuick\inherits Item
Q_SIGNAL void containedWindowChanged(QWindow *window)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNAL
aWidget window() -> setWindowTitle("New Window Title")
[2]
\inmodule QtQuick
Definition qquickitem.h:159