This file is indexed.

/usr/share/qt5/doc/qtquick/qquickwidget.html is in qtdeclarative5-doc-html 5.5.1-2ubuntu6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickwidget.cpp -->
  <title>QQuickWidget Class | Qt Quick 5.5</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.5</li>
<li><a href="qtquick-index.html">Qt Quick</a></li>
<li><a href="qtquick-module.html">C++ Classes</a></li>
<li>QQuickWidget</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#limitations">Limitations</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QQuickWidget Class</h1>
<!-- $$$QQuickWidget-brief -->
<p>The <a href="qquickwidget.html">QQuickWidget</a> class provides a widget for displaying a Qt Quick user interface. <a href="#details">More...</a></p>
<!-- @@@QQuickWidget -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;QQuickWidget&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += quickwidgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.3</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> </td></tr></table></div><ul>
<li><a href="qquickwidget-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#ResizeMode-enum">ResizeMode</a></b> { SizeViewToRootObject, SizeRootObjectToView }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#Status-enum">Status</a></b> { Null, Ready, Loading, Error }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qquickwidget.html#resizeMode-prop">resizeMode</a></b> : ResizeMode</li>
<li class="fn"><b><a href="qquickwidget.html#source-prop">source</a></b> : QUrl</li>
<li class="fn"><b><a href="qquickwidget.html#status-prop">status</a></b> : const Status</li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#QQuickWidget">QQuickWidget</a></b>(QWidget *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#QQuickWidget-2">QQuickWidget</a></b>(QQmlEngine *<i> engine</i>, QWidget *<i> parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#QQuickWidget-3">QQuickWidget</a></b>(const QUrl &amp;<i> source</i>, QWidget *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#dtor.QQuickWidget">~QQuickWidget</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQmlEngine * </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#engine">engine</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QQmlError&gt; </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#errors">errors</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSurfaceFormat </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#format">format</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QImage </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#grabFramebuffer">grabFramebuffer</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#initialSize">initialSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickWindow * </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#quickWindow">quickWindow</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ResizeMode </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#resizeMode-prop">resizeMode</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQmlContext * </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#rootContext">rootContext</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QQuickItem * </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#rootObject">rootObject</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#setClearColor">setClearColor</a></b>(const QColor &amp;<i> color</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#setFormat">setFormat</a></b>(const QSurfaceFormat &amp;<i> format</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#resizeMode-prop">setResizeMode</a></b>(ResizeMode)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#source-prop">source</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Status </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#status-prop">status</a></b>() const</td></tr>
</table></div>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#source-prop">setSource</a></b>(const QUrl &amp;<i> url</i>)</td></tr>
</table></div>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#sceneGraphError">sceneGraphError</a></b>(QQuickWindow::SceneGraphError<i> error</i>, const QString &amp;<i> message</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#status-prop">statusChanged</a></b>(QQuickWidget::Status<i> status</i>)</td></tr>
</table></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#dragEnterEvent">dragEnterEvent</a></b>(QDragEnterEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#dragLeaveEvent">dragLeaveEvent</a></b>(QDragLeaveEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#dragMoveEvent">dragMoveEvent</a></b>(QDragMoveEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#dropEvent">dropEvent</a></b>(QDropEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#event">event</a></b>(QEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#focusInEvent">focusInEvent</a></b>(QFocusEvent *<i> event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#focusOutEvent">focusOutEvent</a></b>(QFocusEvent *<i> event</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#hideEvent">hideEvent</a></b>(QHideEvent *)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#keyPressEvent">keyPressEvent</a></b>(QKeyEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#keyReleaseEvent">keyReleaseEvent</a></b>(QKeyEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b>(QMouseEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#mouseMoveEvent">mouseMoveEvent</a></b>(QMouseEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#mousePressEvent">mousePressEvent</a></b>(QMouseEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#mouseReleaseEvent">mouseReleaseEvent</a></b>(QMouseEvent *<i> e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#showEvent">showEvent</a></b>(QShowEvent *)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qquickwidget.html#wheelEvent">wheelEvent</a></b>(QWheelEvent *<i> e</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QQuickWidget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qquickwidget.html">QQuickWidget</a> class provides a widget for displaying a Qt Quick user interface.</p>
<p>This is a convenience wrapper for <a href="qquickwindow.html">QQuickWindow</a> which will automatically load and display a QML scene when given the URL of the main source file. Alternatively, you can instantiate your own objects using QQmlComponent and place them in a manually set up <a href="qquickwidget.html">QQuickWidget</a>.</p>
<p>Typical usage:</p>
<pre class="cpp"><span class="type"><a href="qquickwidget.html#QQuickWidget">QQuickWidget</a></span> <span class="operator">*</span>view <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qquickwidget.html#QQuickWidget">QQuickWidget</a></span>;
view<span class="operator">-</span><span class="operator">&gt;</span><a href="qquickwidget.html#source-prop">setSource</a>(<span class="type">QUrl</span><span class="operator">::</span>fromLocalFile(<span class="string">&quot;myqmlfile.qml&quot;</span>));
view<span class="operator">-</span><span class="operator">&gt;</span>show();</pre>
<p>To receive errors related to loading and executing QML with <a href="qquickwidget.html">QQuickWidget</a>, you can connect to the <a href="qquickwidget.html#status-prop">statusChanged</a>() signal and monitor for <a href="qquickwidget.html#Status-enum">QQuickWidget::Error</a>. The errors are available via <a href="qquickwidget.html#errors">QQuickWidget::errors</a>().</p>
<p><a href="qquickwidget.html">QQuickWidget</a> also manages sizing of the view and root object. By default, the <a href="qquickwidget.html#resizeMode-prop">resizeMode</a> is <a href="qquickwidget.html#ResizeMode-enum">SizeViewToRootObject</a>, which will load the component and resize it to the size of the view. Alternatively the <a href="qquickwidget.html#resizeMode-prop">resizeMode</a> may be set to <a href="qquickwidget.html#ResizeMode-enum">SizeRootObjectToView</a> which will resize the view to the size of the root object.</p>
<p><b>Note: </b><a href="qquickwidget.html">QQuickWidget</a> is an alternative to using <a href="qquickview.html">QQuickView</a> and QWidget::createWindowContainer(). The restrictions on stacking order do not apply, making <a href="qquickwidget.html">QQuickWidget</a> the more flexible alternative, behaving more like an ordinary widget. This comes at the expense of performance. Unlike <a href="qquickwindow.html">QQuickWindow</a> and <a href="qquickview.html">QQuickView</a>, <a href="qquickwidget.html">QQuickWidget</a> involves rendering into OpenGL framebuffer objects. This will naturally carry a minor performance hit.</p><p><b>Note: </b>Using <a href="qquickwidget.html">QQuickWidget</a> disables the threaded render loop on all platforms. This means that some of the benefits of threaded rendering, for example <a href="qml-qtquick-animator.html">Animator</a> classes and vsync driven animations, will not be available.</p><p><b>Note: </b>Avoid calling winId() on a <a href="qquickwidget.html">QQuickWidget</a>. This function triggers the creation of a native window, resulting in reduced performance and possibly rendering glitches. The entire purpose of <a href="qquickwidget.html">QQuickWidget</a> is to render Quick scenes without a separate native window, hence making it a native widget should always be avoided.</p><a name="limitations"></a>
<h3 >Limitations</h3>
<p>Putting other widgets underneath and making the <a href="qquickwidget.html">QQuickWidget</a> transparent will not lead to the expected results: the widgets underneath will not be visible. This is because in practice the <a href="qquickwidget.html">QQuickWidget</a> is drawn before all other regular, non-OpenGL widgets, and so see-through types of solutions are not feasible. Other type of layouts, like having widgets on top of the <a href="qquickwidget.html">QQuickWidget</a>, will function as expected.</p>
<p>When absolutely necessary, this limitation can be overcome by setting the Qt::WA_AlwaysStackOnTop attribute on the <a href="qquickwidget.html">QQuickWidget</a>. Be aware, however that this breaks stacking order. For example it will not be possible to have other widgets on top of the <a href="qquickwidget.html">QQuickWidget</a>, so it should only be used in situations where a semi-transparent <a href="qquickwidget.html">QQuickWidget</a> with other widgets visible underneath is required.</p>
<p>This limitation only applies when there are other widgets underneath the <a href="qquickwidget.html">QQuickWidget</a> inside the same window. Making the window semi-transparent, with other applications and the desktop visible in the background, is done in the traditional way: Set Qt::WA_TranslucentBackground and change the Qt Quick Scenegraph's clear color to Qt::transparent via <a href="qquickwidget.html#setClearColor">setClearColor</a>().</p>
</div>
<p><b>See also </b>Exposing Attributes of C++ Types to QML, <a href="qtquick-quickwidgets-quickwidget-example.html">Qt Quick Widgets Example</a>, and <a href="qquickview.html">QQuickView</a>.</p>
<!-- @@@QQuickWidget -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ResizeMode$$$SizeViewToRootObject$$$SizeRootObjectToView -->
<h3 class="fn" id="ResizeMode-enum"><a name="ResizeMode-enum"></a>enum QQuickWidget::<span class="name">ResizeMode</span></h3>
<p>This enum specifies how to resize the view.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QQuickWidget::SizeViewToRootObject</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">The view resizes with the root item in the QML.</td></tr>
<tr><td class="topAlign"><code>QQuickWidget::SizeRootObjectToView</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">The view will automatically resize the root item to the size of the view.</td></tr>
</table></div>
<!-- @@@ResizeMode -->
<!-- $$$Status$$$Null$$$Ready$$$Loading$$$Error -->
<h3 class="fn" id="Status-enum"><a name="Status-enum"></a>enum QQuickWidget::<span class="name">Status</span></h3>
<p>Specifies the loading status of the <a href="qquickwidget.html">QQuickWidget</a>.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QQuickWidget::Null</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">This <a href="qquickwidget.html">QQuickWidget</a> has no source set.</td></tr>
<tr><td class="topAlign"><code>QQuickWidget::Ready</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">This <a href="qquickwidget.html">QQuickWidget</a> has loaded and created the QML component.</td></tr>
<tr><td class="topAlign"><code>QQuickWidget::Loading</code></td><td class="topAlign"><code>2</code></td><td class="topAlign">This <a href="qquickwidget.html">QQuickWidget</a> is loading network data.</td></tr>
<tr><td class="topAlign"><code>QQuickWidget::Error</code></td><td class="topAlign"><code>3</code></td><td class="topAlign">One or more errors occurred. Call <a href="qquickwidget.html#errors">errors</a>() to retrieve a list of errors.</td></tr>
</table></div>
<!-- @@@Status -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$resizeMode-prop$$$resizeMode$$$setResizeModeResizeMode -->
<h3 class="fn" id="resizeMode-prop"><a name="resizeMode-prop"></a><span class="name">resizeMode</span> : <span class="type"><a href="qquickwidget.html#ResizeMode-enum">ResizeMode</a></span></h3>
<p>This property determines whether the view should resize the window contents.</p>
<p>If this property is set to <a href="qquickwidget.html#ResizeMode-enum">SizeViewToRootObject</a> (the default), the view resizes to the size of the root item in the QML.</p>
<p>If this property is set to <a href="qquickwidget.html#ResizeMode-enum">SizeRootObjectToView</a>, the view will automatically resize the root item to the size of the view.</p>
<p>Regardless of this property, the sizeHint of the view is the initial size of the root item. Note though that since QML may load dynamically, that size may change.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> ResizeMode </td><td class="memItemRight bottomAlign"><span class="name"><b>resizeMode</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setResizeMode</b></span>(ResizeMode)</td></tr>
</table></div>
<p><b>See also </b><a href="qquickwidget.html#initialSize">initialSize</a>().</p>
<!-- @@@resizeMode -->
<!-- $$$source-prop$$$source$$$setSourceconstQUrl& -->
<h3 class="fn" id="source-prop"><a name="source-prop"></a><span class="name">source</span> : <span class="type">QUrl</span></h3>
<p>This property holds the URL of the source of the QML component.</p>
<p>Ensure that the URL provided is full and correct, in particular, use QUrl::fromLocalFile() when loading a file from the local filesystem.</p>
<p><b>Note: </b>Setting a source URL will result in the QML component being instantiated, even if the URL is unchanged from the current value.</p><p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QUrl </td><td class="memItemRight bottomAlign"><span class="name"><b>source</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSource</b></span>(const QUrl &amp;<i> url</i>)</td></tr>
</table></div>
<!-- @@@source -->
<!-- $$$status-prop$$$status$$$statusChangedQQuickWidget::Status -->
<h3 class="fn" id="status-prop"><a name="status-prop"></a><span class="name">status</span> : const <span class="type"><a href="qquickwidget.html#Status-enum">Status</a></span></h3>
<p>The component's current <a href="qquickwidget.html#Status-enum">status</a>.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Status </td><td class="memItemRight bottomAlign"><span class="name"><b>status</b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>statusChanged</b></span>(QQuickWidget::Status<i> status</i>)</td></tr>
</table></div>
<!-- @@@status -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QQuickWidget[overload1]$$$QQuickWidgetQWidget* -->
<h3 class="fn" id="QQuickWidget"><a name="QQuickWidget"></a>QQuickWidget::<span class="name">QQuickWidget</span>(<span class="type">QWidget</span> *<i> parent</i> = 0)</h3>
<p>Constructs a <a href="qquickwidget.html">QQuickWidget</a> with the given <i>parent</i>. The default value of <i>parent</i> is 0.</p>
<!-- @@@QQuickWidget -->
<!-- $$$QQuickWidget$$$QQuickWidgetQQmlEngine*QWidget* -->
<h3 class="fn" id="QQuickWidget-2"><a name="QQuickWidget-2"></a>QQuickWidget::<span class="name">QQuickWidget</span>(<span class="type">QQmlEngine</span> *<i> engine</i>, <span class="type">QWidget</span> *<i> parent</i>)</h3>
<p>Constructs a <a href="qquickwidget.html">QQuickWidget</a> with the given QML <i>engine</i> and <i>parent</i>.</p>
<p>Note: In this case, the <a href="qquickwidget.html">QQuickWidget</a> does not own the given <i>engine</i> object; it is the caller's responsibility to destroy the engine. If the <i>engine</i> is deleted before the view, <a href="qquickwidget.html#status-prop">status</a>() will return <a href="qquickwidget.html#Status-enum">QQuickWidget::Error</a>.</p>
<p><b>See also </b><a href="qquickwidget.html#Status-enum">Status</a>, <a href="qquickwidget.html#status-prop">status</a>(), and <a href="qquickwidget.html#errors">errors</a>().</p>
<!-- @@@QQuickWidget -->
<!-- $$$QQuickWidget$$$QQuickWidgetconstQUrl&QWidget* -->
<h3 class="fn" id="QQuickWidget-3"><a name="QQuickWidget-3"></a>QQuickWidget::<span class="name">QQuickWidget</span>(const <span class="type">QUrl</span> &amp;<i> source</i>, <span class="type">QWidget</span> *<i> parent</i> = 0)</h3>
<p>Constructs a <a href="qquickwidget.html">QQuickWidget</a> with the given QML <i>source</i> and <i>parent</i>. The default value of <i>parent</i> is 0.</p>
<!-- @@@QQuickWidget -->
<!-- $$$~QQuickWidget[overload1]$$$~QQuickWidget -->
<h3 class="fn" id="dtor.QQuickWidget"><a name="dtor.QQuickWidget"></a><code>[virtual] </code>QQuickWidget::<span class="name">~QQuickWidget</span>()</h3>
<p>Destroys the <a href="qquickwidget.html">QQuickWidget</a>.</p>
<!-- @@@~QQuickWidget -->
<!-- $$$dragEnterEvent[overload1]$$$dragEnterEventQDragEnterEvent* -->
<h3 class="fn" id="dragEnterEvent"><a name="dragEnterEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">dragEnterEvent</span>(<span class="type">QDragEnterEvent</span> *<i> e</i>)</h3>
<!-- @@@dragEnterEvent -->
<!-- $$$dragLeaveEvent[overload1]$$$dragLeaveEventQDragLeaveEvent* -->
<h3 class="fn" id="dragLeaveEvent"><a name="dragLeaveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">dragLeaveEvent</span>(<span class="type">QDragLeaveEvent</span> *<i> e</i>)</h3>
<!-- @@@dragLeaveEvent -->
<!-- $$$dragMoveEvent[overload1]$$$dragMoveEventQDragMoveEvent* -->
<h3 class="fn" id="dragMoveEvent"><a name="dragMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">dragMoveEvent</span>(<span class="type">QDragMoveEvent</span> *<i> e</i>)</h3>
<!-- @@@dragMoveEvent -->
<!-- $$$dropEvent[overload1]$$$dropEventQDropEvent* -->
<h3 class="fn" id="dropEvent"><a name="dropEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">dropEvent</span>(<span class="type">QDropEvent</span> *<i> e</i>)</h3>
<!-- @@@dropEvent -->
<!-- $$$engine[overload1]$$$engine -->
<h3 class="fn" id="engine"><a name="engine"></a><span class="type">QQmlEngine</span> * QQuickWidget::<span class="name">engine</span>() const</h3>
<p>Returns a pointer to the QQmlEngine used for instantiating QML Components.</p>
<!-- @@@engine -->
<!-- $$$errors[overload1]$$$errors -->
<h3 class="fn" id="errors"><a name="errors"></a><span class="type">QList</span>&lt;<span class="type">QQmlError</span>&gt; QQuickWidget::<span class="name">errors</span>() const</h3>
<p>Return the list of errors that occurred during the last compile or create operation. When the status is not <a href="qquickwidget.html#Status-enum">Error</a>, an empty list is returned.</p>
<p><b>See also </b><a href="qquickwidget.html#status-prop">status</a>.</p>
<!-- @@@errors -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[protected] </code><span class="type">bool</span> QQuickWidget::<span class="name">event</span>(<span class="type">QEvent</span> *<i> e</i>)</h3>
<!-- @@@event -->
<!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* -->
<h3 class="fn" id="focusInEvent"><a name="focusInEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">focusInEvent</span>(<span class="type">QFocusEvent</span> *<i> event</i>)</h3>
<!-- @@@focusInEvent -->
<!-- $$$focusOutEvent[overload1]$$$focusOutEventQFocusEvent* -->
<h3 class="fn" id="focusOutEvent"><a name="focusOutEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">focusOutEvent</span>(<span class="type">QFocusEvent</span> *<i> event</i>)</h3>
<!-- @@@focusOutEvent -->
<!-- $$$format[overload1]$$$format -->
<h3 class="fn" id="format"><a name="format"></a><span class="type">QSurfaceFormat</span> QQuickWidget::<span class="name">format</span>() const</h3>
<p>Returns the actual surface format.</p>
<p>If the widget has not yet been shown, the requested format is returned.</p>
<p><b>See also </b><a href="qquickwidget.html#setFormat">setFormat</a>().</p>
<!-- @@@format -->
<!-- $$$grabFramebuffer[overload1]$$$grabFramebuffer -->
<h3 class="fn" id="grabFramebuffer"><a name="grabFramebuffer"></a><span class="type">QImage</span> QQuickWidget::<span class="name">grabFramebuffer</span>() const</h3>
<p>Renders a frame and reads it back into an image.</p>
<p><b>Note: </b>This is a potentially expensive operation.</p><!-- @@@grabFramebuffer -->
<!-- $$$hideEvent[overload1]$$$hideEventQHideEvent* -->
<h3 class="fn" id="hideEvent"><a name="hideEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">hideEvent</span>(<span class="type">QHideEvent</span> *)</h3>
<!-- @@@hideEvent -->
<!-- $$$initialSize[overload1]$$$initialSize -->
<h3 class="fn" id="initialSize"><a name="initialSize"></a><span class="type">QSize</span> QQuickWidget::<span class="name">initialSize</span>() const</h3>
<p>Returns the initial size of the root object.</p>
<p>If <a href="qquickwidget.html#resizeMode-prop">resizeMode</a> is <a href="qquickwidget.html#ResizeMode-enum">SizeRootObjectToView</a>, the root object will be resized to the size of the view. This function returns the size of the root object before it was resized.</p>
<!-- @@@initialSize -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn" id="keyPressEvent"><a name="keyPressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">keyPressEvent</span>(<span class="type">QKeyEvent</span> *<i> e</i>)</h3>
<!-- @@@keyPressEvent -->
<!-- $$$keyReleaseEvent[overload1]$$$keyReleaseEventQKeyEvent* -->
<h3 class="fn" id="keyReleaseEvent"><a name="keyReleaseEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">keyReleaseEvent</span>(<span class="type">QKeyEvent</span> *<i> e</i>)</h3>
<!-- @@@keyReleaseEvent -->
<!-- $$$mouseDoubleClickEvent[overload1]$$$mouseDoubleClickEventQMouseEvent* -->
<h3 class="fn" id="mouseDoubleClickEvent"><a name="mouseDoubleClickEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">mouseDoubleClickEvent</span>(<span class="type">QMouseEvent</span> *<i> e</i>)</h3>
<!-- @@@mouseDoubleClickEvent -->
<!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* -->
<h3 class="fn" id="mouseMoveEvent"><a name="mouseMoveEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">mouseMoveEvent</span>(<span class="type">QMouseEvent</span> *<i> e</i>)</h3>
<!-- @@@mouseMoveEvent -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn" id="mousePressEvent"><a name="mousePressEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">mousePressEvent</span>(<span class="type">QMouseEvent</span> *<i> e</i>)</h3>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn" id="mouseReleaseEvent"><a name="mouseReleaseEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">mouseReleaseEvent</span>(<span class="type">QMouseEvent</span> *<i> e</i>)</h3>
<!-- @@@mouseReleaseEvent -->
<!-- $$$quickWindow[overload1]$$$quickWindow -->
<h3 class="fn" id="quickWindow"><a name="quickWindow"></a><span class="type"><a href="qquickwindow.html">QQuickWindow</a></span> * QQuickWidget::<span class="name">quickWindow</span>() const</h3>
<p>Returns the offscreen <a href="qquickwindow.html">QQuickWindow</a> which is used by this widget to drive the Qt Quick rendering. This is useful if you want to use <a href="qquickwindow.html">QQuickWindow</a> APIs that are not currently exposed by <a href="qquickwidget.html">QQuickWidget</a>, for instance connecting to the <a href="qquickwindow.html#beforeRendering">QQuickWindow::beforeRendering</a>() signal in order to draw native OpenGL content below Qt Quick's own rendering.</p>
<p><b>Warning:</b> Use the return value of this function with caution. In particular, do not ever attempt to show the <a href="qquickwindow.html">QQuickWindow</a>, and be very careful when using other QWindow-only APIs.</p>
<p>This function was introduced in  Qt 5.5.</p>
<!-- @@@quickWindow -->
<!-- $$$rootContext[overload1]$$$rootContext -->
<h3 class="fn" id="rootContext"><a name="rootContext"></a><span class="type">QQmlContext</span> * QQuickWidget::<span class="name">rootContext</span>() const</h3>
<p>This function returns the root of the context hierarchy. Each QML component is instantiated in a QQmlContext. QQmlContext's are essential for passing data to QML components. In QML, contexts are arranged hierarchically and this hierarchy is managed by the QQmlEngine.</p>
<!-- @@@rootContext -->
<!-- $$$rootObject[overload1]$$$rootObject -->
<h3 class="fn" id="rootObject"><a name="rootObject"></a><span class="type"><a href="qquickitem.html">QQuickItem</a></span> * QQuickWidget::<span class="name">rootObject</span>() const</h3>
<p>Returns the view's root <a href="qquickitem.html">item</a>.</p>
<!-- @@@rootObject -->
<!-- $$$sceneGraphError[overload1]$$$sceneGraphErrorQQuickWindow::SceneGraphErrorconstQString& -->
<h3 class="fn" id="sceneGraphError"><a name="sceneGraphError"></a><code>[signal] </code><span class="type">void</span> QQuickWidget::<span class="name">sceneGraphError</span>(<span class="type"><a href="qquickwindow.html#SceneGraphError-enum">QQuickWindow::SceneGraphError</a></span><i> error</i>, const <span class="type">QString</span> &amp;<i> message</i>)</h3>
<p>This signal is emitted when an <i>error</i> occurred during scene graph initialization.</p>
<p>Applications should connect to this signal if they wish to handle errors, like OpenGL context creation failures, in a custom way. When no slot is connected to the signal, the behavior will be different: Quick will print the <i>message</i>, or show a message box, and terminate the application.</p>
<p>This signal will be emitted from the gui thread.</p>
<p><b>See also </b><a href="qquickwindow.html#sceneGraphError">QQuickWindow::sceneGraphError</a>().</p>
<!-- @@@sceneGraphError -->
<!-- $$$setClearColor[overload1]$$$setClearColorconstQColor& -->
<h3 class="fn" id="setClearColor"><a name="setClearColor"></a><span class="type">void</span> QQuickWidget::<span class="name">setClearColor</span>(const <span class="type">QColor</span> &amp;<i> color</i>)</h3>
<p>Sets the clear <i>color</i>. By default this is an opaque color.</p>
<p>To get a semi- or fully transparent <a href="qquickwidget.html">QQuickWidget</a>, call this function with <i>color</i> set to Qt::transparent and set the Qt::WA_TranslucentBackground widget attribute.</p>
<p><b>See also </b><a href="qquickwindow.html#color-prop">QQuickWindow::setColor</a>().</p>
<!-- @@@setClearColor -->
<!-- $$$setFormat[overload1]$$$setFormatconstQSurfaceFormat& -->
<h3 class="fn" id="setFormat"><a name="setFormat"></a><span class="type">void</span> QQuickWidget::<span class="name">setFormat</span>(const <span class="type">QSurfaceFormat</span> &amp;<i> format</i>)</h3>
<p>Sets the surface <i>format</i> for the context and offscreen surface used by this widget.</p>
<p>Call this function when there is a need to request a context for a given OpenGL version or profile. The sizes for depth, stencil and alpha buffers are taken care of automatically and there is no need to request those explicitly.</p>
<p><b>See also </b>QWindow::setFormat(), QWindow::format(), and <a href="qquickwidget.html#format">format</a>().</p>
<!-- @@@setFormat -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" id="showEvent"><a name="showEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">showEvent</span>(<span class="type">QShowEvent</span> *)</h3>
<!-- @@@showEvent -->
<!-- $$$wheelEvent[overload1]$$$wheelEventQWheelEvent* -->
<h3 class="fn" id="wheelEvent"><a name="wheelEvent"></a><code>[virtual protected] </code><span class="type">void</span> QQuickWidget::<span class="name">wheelEvent</span>(<span class="type">QWheelEvent</span> *<i> e</i>)</h3>
<!-- @@@wheelEvent -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>