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
qquickwidget_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QQUICKWIDGET_P_H
5#define QQUICKWIDGET_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 "qquickwidget.h"
19#include <private/qwidget_p.h>
20#include <rhi/qrhi.h>
21#include <private/qbackingstorerhisupport_p.h>
22
23#include <QtCore/qurl.h>
24#include <QtCore/qelapsedtimer.h>
25#include <QtCore/qtimer.h>
26#include <QtCore/qpointer.h>
27#include <QtCore/QWeakPointer>
28
29#include <QtQml/qqmlengine.h>
30
31#include "private/qquickitemchangelistener_p.h"
32
34
35class QQmlContext;
36class QQmlError;
37class QQuickItem;
38class QQmlComponent;
39class QQuickRenderControl;
40
42 : public QWidgetPrivate,
44{
45 Q_DECLARE_PUBLIC(QQuickWidget)
46public:
48 static const QQuickWidgetPrivate* get(const QQuickWidget *view) { return view->d_func(); }
49
51
52 void executeHelper();
53 void destroy();
54 void execute();
55 void execute(QAnyStringView uri, QAnyStringView typeName);
56 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override;
57 void initResize();
58 void updateSize();
59 void updatePosition();
61 bool setRootObject(QObject *);
62 void render(bool needsSync);
63 void renderSceneGraph();
64 void initializeWithRhi();
65 void handleContextCreationFailure(const QSurfaceFormat &format);
66
68 TextureData texture() const override;
70 QImage grabFramebuffer() override;
71
72 void init(QQmlEngine* e = nullptr);
73 void ensureBackingScene();
75 void ensureEngine() const;
76 void handleWindowChange();
78
79 QSize rootObjectSize() const;
80
82
84
86 QQmlComponent *component;
89 QQuickRenderControl *renderControl;
90
91 QRhi *rhi;
92 QRhiTexture *outputTexture;
93 QRhiRenderBuffer *depthStencil;
94 QRhiRenderBuffer *msaaBuffer;
97
101
106
108
114
116
118};
119
127
128QT_END_NAMESPACE
129
130#endif // QQuickWidget_P_H
QRhiRenderBuffer * depthStencil
QSize rootObjectSize() const
void updateFrambufferObjectSize()
bool setRootObject(QObject *)
QBasicTimer resizetimer
QImage grabFramebuffer() override
void execute(QAnyStringView uri, QAnyStringView typeName)
QVariantMap initialProperties
QQuickRenderControl * renderControl
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override
void handleContextCreationFailure(const QSurfaceFormat &format)
QPointer< QQuickItem > root
void ensureEngine() const
void init(QQmlEngine *e=nullptr)
QQmlComponent * component
QRhiRenderBuffer * msaaBuffer
QPlatformTextureList::Flags textureListFlags() override
QRhiTexture * outputTexture
TextureData texture() const override
QElapsedTimer frameTimer
QBackingStoreRhiSupport offscreenRenderer
QRhiRenderPassDescriptor * rtRp
QPlatformBackingStoreRhiConfig rhiConfig() const override
QPointer< QQmlEngine > engine
QQuickWindow * offscreenWindow
QRhiTextureRenderTarget * rt
void render(bool needsSync)
The QQuickWidget class provides a widget for displaying a Qt Quick user interface.