<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qdeclarativeview.cpp --> <title>Qt 4.8: QDeclarativeView Class Reference</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/functions.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <link rel="stylesheet" type="text/css" href="style/narrow.css" /> <!--[if IE]> <meta name="MSSmartTagsPreventParsing" content="true"> <meta http-equiv="imagetoolbar" content="no"> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie6.css"> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie7.css"> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="style/style_ie8.css"> <![endif]--> <script src="scripts/superfish.js" type="text/javascript"></script> <script src="scripts/narrow.js" type="text/javascript"></script> </head> <body class="" onload="CheckEmptyAndLoadList();"> <div class="header" id="qtdocheader"> <div class="content"> <div id="nav-logo"> <a href="index.html">Home</a></div> <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a> <div id="narrowsearch"></div> <div id="nav-topright"> <ul> <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li> <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li> <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/"> DOC</a></li> <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li> </ul> </div> <div id="shortCut"> <ul> <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li> <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS </a></li> </ul> </div> <ul class="sf-menu" id="narrowmenu"> <li><a href="#">API Lookup</a> <ul> <li><a href="classes.html">Class index</a></li> <li><a href="functions.html">Function index</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="qtglobal.html">Global Declarations</a></li> <li><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </li> <li><a href="#">Qt Topics</a> <ul> <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li><a href="supported-platforms.html">Supported Platforms</a></li> <li><a href="technology-apis.html">Qt and Key Technologies</a></li> <li><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </li> <li><a href="#">Examples</a> <ul> <li><a href="all-examples.html">Examples</a></li> <li><a href="tutorials.html">Tutorials</a></li> <li><a href="demos.html">Demos</a></li> <li><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </li> </ul> </div> </div> <div class="wrapper"> <div class="hd"> <span></span> </div> <div class="bd group"> <div class="sidebar"> <div class="searchlabel"> Search index:</div> <div class="search" id="sidebarsearch"> <form id="qtdocsearch" action="" onsubmit="return false;"> <fieldset> <input type="text" name="searchstring" id="pageType" value="" /> <div id="resultdialog"> <a href="#" id="resultclose">Close</a> <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span> results:</p> <ul id="resultlist" class="all"> </ul> </div> </fieldset> </form> </div> <div class="box first bottombar" id="lookup"> <h2 title="API Lookup"><span></span> API Lookup</h2> <div id="list001" class="list"> <ul id="ul001" > <li class="defaultLink"><a href="classes.html">Class index</a></li> <li class="defaultLink"><a href="functions.html">Function index</a></li> <li class="defaultLink"><a href="modules.html">Modules</a></li> <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li> <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li> <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </div> </div> <div class="box bottombar" id="topics"> <h2 title="Qt Topics"><span></span> Qt Topics</h2> <div id="list002" class="list"> <ul id="ul002" > <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li class="defaultLink"><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li> <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </div> </div> <div class="box" id="examples"> <h2 title="Examples"><span></span> Examples</h2> <div id="list003" class="list"> <ul id="ul003"> <li class="defaultLink"><a href="all-examples.html">Examples</a></li> <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li> <li class="defaultLink"><a href="demos.html">Demos</a></li> <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </div> </div> </div> <div class="wrap"> <div class="toolbar"> <div class="breadcrumb toolblock"> <ul> <li class="first"><a href="index.html">Home</a></li> <!-- Breadcrumbs go here --> <li><a href="modules.html">Modules</a></li> <li><a href="qtdeclarative.html">QtDeclarative</a></li> <li>QDeclarativeView</li> </ul> </div> <div class="toolbuttons toolblock"> <ul> <li id="smallA" class="t_button">A</li> <li id="medA" class="t_button active">A</li> <li id="bigA" class="t_button">A</li> <li id="print" class="t_button"><a href="javascript:this.print();"> <span>Print</span></a></li> </ul> </div> </div> <div class="content mainContent"> <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="#signals">Signals</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">QDeclarativeView Class Reference</h1> <!-- $$$QDeclarativeView-brief --> <p>The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface. <a href="#details">More...</a></p> <!-- @@@QDeclarativeView --> <pre class="cpp"> <span class="preprocessor">#include <QDeclarativeView></span></pre><p><b>Inherits: </b><a href="qgraphicsview.html">QGraphicsView</a>.</p> <p>This class was introduced in Qt 4.7.</p> <ul> <li><a href="qdeclarativeview-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-types"></a> <h2>Public Types</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.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="qdeclarativeview.html#Status-enum">Status</a></b> { Null, Ready, Loading, Error }</td></tr> </table> <a name="properties"></a> <h2>Properties</h2> <ul> <li class="fn"><b><a href="qdeclarativeview.html#resizeMode-prop">resizeMode</a></b> : ResizeMode</li> <li class="fn"><b><a href="qdeclarativeview.html#source-prop">source</a></b> : QUrl</li> <li class="fn"><b><a href="qdeclarativeview.html#status-prop">status</a></b> : const Status</li> </ul> <ul> <li class="fn">13 properties inherited from <a href="qgraphicsview.html#properties">QGraphicsView</a></li> <li class="fn">2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li> <li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li> <li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li> <li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li> </ul> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#QDeclarativeView">QDeclarativeView</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#QDeclarativeView-2">QDeclarativeView</a></b> ( const QUrl & <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="qdeclarativeview.html#dtor.QDeclarativeView">~QDeclarativeView</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDeclarativeEngine * </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#engine">engine</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QList<QDeclarativeError> </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#errors">errors</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#initialSize">initialSize</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> ResizeMode </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#resizeMode-prop">resizeMode</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QDeclarativeContext * </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#rootContext">rootContext</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QGraphicsObject * </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#rootObject">rootObject</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#resizeMode-prop">setResizeMode</a></b> ( ResizeMode )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#source-prop">setSource</a></b> ( const QUrl & <i>url</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QUrl </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#source-prop">source</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> Status </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#status-prop">status</a></b> () const</td></tr> </table> <ul> <li class="fn">77 public functions inherited from <a href="qgraphicsview.html#public-functions">QGraphicsView</a></li> <li class="fn">17 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li> <li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li> <li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li> <li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li> <li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li> </ul> <a name="signals"></a> <h2>Signals</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#sceneResized">sceneResized</a></b> ( QSize <i>size</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeview.html#statusChanged">statusChanged</a></b> ( QDeclarativeView::Status <i>status</i> )</td></tr> </table> <ul> <li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li> <li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li class="fn">3 public slots inherited from <a href="qgraphicsview.html#public-slots">QGraphicsView</a></li> <li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li> <li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li> <li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li> <li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li> <li class="fn">24 protected functions inherited from <a href="qgraphicsview.html#protected-functions">QGraphicsView</a></li> <li class="fn">18 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li> <li class="fn">3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li> <li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li> <li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li> <li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li> <li class="fn">1 protected slot inherited from <a href="qgraphicsview.html#protected-slots">QGraphicsView</a></li> <li class="fn">1 protected slot inherited from <a href="qabstractscrollarea.html#protected-slots">QAbstractScrollArea</a></li> <li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li> </ul> <a name="details"></a> <!-- $$$QDeclarativeView-description --> <div class="descr"> <h2>Detailed Description</h2> <p>The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.</p> <p><a href="qdeclarativeitem.html">QDeclarativeItem</a> objects can be placed on a standard <a href="qgraphicsscene.html">QGraphicsScene</a> and displayed with <a href="qgraphicsview.html">QGraphicsView</a>. QDeclarativeView is a <a href="qgraphicsview.html">QGraphicsView</a> subclass provided as a convenience for displaying QML files, and connecting between QML and C++ Qt objects.</p> <p>QDeclarativeView provides:</p> <ul> <li>Management of <a href="qdeclarativecomponent.html">QDeclarativeComponent</a> loading and object creation</li> <li>Initialization of <a href="qgraphicsview.html">QGraphicsView</a> for optimal performance with QML using these settings:<ul> <li>QGraphicsView::setOptimizationFlags(<a href="qgraphicsview.html#OptimizationFlag-enum">QGraphicsView::DontSavePainterState</a>)</li> <li>QGraphicsView::setViewportUpdateMode(<a href="qgraphicsview.html#ViewportUpdateMode-enum">QGraphicsView::BoundingRectViewportUpdate</a>)</li> <li>QGraphicsScene::setItemIndexMethod(<a href="qgraphicsscene.html#ItemIndexMethod-enum">QGraphicsScene::NoIndex</a>)</li> </ul> </li> <li>Initialization of <a href="qgraphicsview.html">QGraphicsView</a> for QML key handling using these settings:<ul> <li><a href="qabstractscrollarea.html#viewport">QGraphicsView::viewport</a>()->setFocusPolicy(<a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a>)</li> <li>QGraphicsView::setFocusPolicy(<a href="qt.html#FocusPolicy-enum">Qt::StrongFocus</a>)</li> <li>QGraphicsScene::setStickyFocus(true)</li> </ul> </li> </ul> <p>Typical usage:</p> <pre class="cpp"> <span class="type">QDeclarativeView</span> <span class="operator">*</span>view <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QDeclarativeView</span>; view<span class="operator">-</span><span class="operator">></span><a href="qdeclarativeview.html#source-prop">setSource</a>(<span class="type"><a href="qurl.html">QUrl</a></span><span class="operator">::</span>fromLocalFile(<span class="string">"myqmlfile.qml"</span>)); view<span class="operator">-</span><span class="operator">></span><a href="qwidget.html#show">show</a>();</pre> <p>Since QDeclarativeView is a <a href="qwidget.html">QWidget</a>-based class, it can be used to display QML interfaces within <a href="qwidget.html">QWidget</a>-based GUI applications that do not use the Graphics View framework.</p> <p>To receive errors related to loading and executing QML with QDeclarativeView, you can connect to the <a href="qdeclarativeview.html#statusChanged">statusChanged</a>() signal and monitor for <a href="qdeclarativeview.html#Status-enum">QDeclarativeView::Error</a>. The errors are available via <a href="qdeclarativeview.html#errors">QDeclarativeView::errors</a>().</p> <p>If you're using your own <a href="qgraphicsscene.html">QGraphicsScene</a>-based scene with QDeclarativeView, remember to enable scene's sticky focus mode and to set itemIndexMethod to <a href="qgraphicsscene.html#ItemIndexMethod-enum">QGraphicsScene::NoIndex</a>.</p> </div> <p><b>See also </b><a href="qml-integration.html">Integrating QML Code with Existing Qt UI Code</a> and <a href="qtbinding.html">Using QML Bindings in C++ Applications</a>.</p> <!-- @@@QDeclarativeView --> <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$ResizeMode$$$SizeViewToRootObject$$$SizeRootObjectToView --> <h3 class="fn"><a name="ResizeMode-enum"></a>enum QDeclarativeView::<span class="name">ResizeMode</span></h3> <p>This enum specifies how to resize the view.</p> <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"><tt>QDeclarativeView::SizeViewToRootObject</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The view resizes with the root item in the QML.</td></tr> <tr><td class="topAlign"><tt>QDeclarativeView::SizeRootObjectToView</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The view will automatically resize the root item to the size of the view.</td></tr> </table> <!-- @@@ResizeMode --> <!-- $$$Status$$$Null$$$Ready$$$Loading$$$Error --> <h3 class="fn"><a name="Status-enum"></a>enum QDeclarativeView::<span class="name">Status</span></h3> <p>Specifies the loading status of the <a href="qdeclarativeview.html">QDeclarativeView</a>.</p> <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"><tt>QDeclarativeView::Null</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">This <a href="qdeclarativeview.html">QDeclarativeView</a> has no source set.</td></tr> <tr><td class="topAlign"><tt>QDeclarativeView::Ready</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">This <a href="qdeclarativeview.html">QDeclarativeView</a> has loaded and created the QML component.</td></tr> <tr><td class="topAlign"><tt>QDeclarativeView::Loading</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">This <a href="qdeclarativeview.html">QDeclarativeView</a> is loading network data.</td></tr> <tr><td class="topAlign"><tt>QDeclarativeView::Error</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">One or more errors has occurred. Call <a href="qdeclarativeview.html#errors">errors</a>() to retrieve a list of errors.</td></tr> </table> <!-- @@@Status --> </div> <div class="prop"> <h2>Property Documentation</h2> <!-- $$$resizeMode-prop$$$resizeMode$$$setResizeModeResizeMode --> <h3 class="fn"><a name="resizeMode-prop"></a><span class="name">resizeMode</span> : <span class="type"><a href="qdeclarativeview.html#ResizeMode-enum">ResizeMode</a></span></h3> <p>This property holds whether the view should resize the canvas contents.</p> <p>If this property is set to <a href="qdeclarativeview.html#ResizeMode-enum">SizeViewToRootObject</a> (the default), the view resizes with the root item in the QML.</p> <p>If this property is set to <a href="qdeclarativeview.html#ResizeMode-enum">SizeRootObjectToView</a>, the view will automatically resize the root item.</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> <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> <!-- @@@resizeMode --> <!-- $$$source-prop$$$source$$$setSourceconstQUrl& --> <h3 class="fn"><a name="source-prop"></a><span class="name">source</span> : <span class="type"><a href="qurl.html">QUrl</a></span></h3> <p>This property holds the URL of the source of the QML component.</p> <p>Changing this property causes the QML component to be reloaded.</p> <p>Ensure that the URL provided is full and correct, in particular, use <a href="qurl.html#fromLocalFile">QUrl::fromLocalFile</a>() when loading a file from the local filesystem.</p> <p><b>Access functions:</b></p> <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 & <i>url</i> )</td></tr> </table> <p><b>See also </b><a href="qdeclarativenetwork.html">Loading Resources in QML</a>.</p> <!-- @@@source --> <!-- $$$status-prop$$$status$$$statusChangedQDeclarativeView::Status --> <h3 class="fn"><a name="status-prop"></a><span class="name">status</span> : const <span class="type"><a href="qdeclarativeview.html#Status-enum">Status</a></span></h3> <p>The component's current <a href="qdeclarativeview.html#Status-enum">status</a>.</p> <p><b>Access functions:</b></p> <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> <p><b>Notifier signal:</b></p> <table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qdeclarativeview.html#statusChanged">statusChanged</a></b></span> ( QDeclarativeView::Status <i>status</i> )</td></tr> </table> <!-- @@@status --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QDeclarativeView[overload1]$$$QDeclarativeViewQWidget* --> <h3 class="fn"><a name="QDeclarativeView"></a>QDeclarativeView::<span class="name">QDeclarativeView</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3> <p>Constructs a <a href="qdeclarativeview.html">QDeclarativeView</a> with the given <i>parent</i>.</p> <!-- @@@QDeclarativeView --> <!-- $$$QDeclarativeView$$$QDeclarativeViewconstQUrl&QWidget* --> <h3 class="fn"><a name="QDeclarativeView-2"></a>QDeclarativeView::<span class="name">QDeclarativeView</span> ( const <span class="type"><a href="qurl.html">QUrl</a></span> & <i>source</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3> <p>Constructs a <a href="qdeclarativeview.html">QDeclarativeView</a> with the given QML <i>source</i> and <i>parent</i>.</p> <!-- @@@QDeclarativeView --> <!-- $$$~QDeclarativeView[overload1]$$$~QDeclarativeView --> <h3 class="fn"><a name="dtor.QDeclarativeView"></a>QDeclarativeView::<span class="name">~QDeclarativeView</span> ()<tt> [virtual]</tt></h3> <p>Destroys the view.</p> <!-- @@@~QDeclarativeView --> <!-- $$$engine[overload1]$$$engine --> <h3 class="fn"><a name="engine"></a><span class="type"><a href="qdeclarativeengine.html">QDeclarativeEngine</a></span> * QDeclarativeView::<span class="name">engine</span> () const</h3> <p>Returns a pointer to the <a href="qdeclarativeengine.html">QDeclarativeEngine</a> used for instantiating QML Components.</p> <!-- @@@engine --> <!-- $$$errors[overload1]$$$errors --> <h3 class="fn"><a name="errors"></a><span class="type"><a href="qlist.html">QList</a></span><<span class="type"><a href="qdeclarativeerror.html">QDeclarativeError</a></span>> QDeclarativeView::<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 Error, an empty list is returned.</p> <!-- @@@errors --> <!-- $$$initialSize[overload1]$$$initialSize --> <h3 class="fn"><a name="initialSize"></a><span class="type"><a href="qsize.html">QSize</a></span> QDeclarativeView::<span class="name">initialSize</span> () const</h3> <p>Returns the initial size of the root object</p> <!-- @@@initialSize --> <!-- $$$rootContext[overload1]$$$rootContext --> <h3 class="fn"><a name="rootContext"></a><span class="type"><a href="qdeclarativecontext.html">QDeclarativeContext</a></span> * QDeclarativeView::<span class="name">rootContext</span> () const</h3> <p>This function returns the root of the context hierarchy. Each QML component is instantiated in a <a href="qdeclarativecontext.html">QDeclarativeContext</a>. <a href="qdeclarativecontext.html">QDeclarativeContext</a>'s are essential for passing data to QML components. In QML, contexts are arranged hierarchically and this hierarchy is managed by the <a href="qdeclarativeengine.html">QDeclarativeEngine</a>.</p> <!-- @@@rootContext --> <!-- $$$rootObject[overload1]$$$rootObject --> <h3 class="fn"><a name="rootObject"></a><span class="type"><a href="qgraphicsobject.html">QGraphicsObject</a></span> * QDeclarativeView::<span class="name">rootObject</span> () const</h3> <p>Returns the view's root <a href="qgraphicsobject.html">item</a>.</p> <!-- @@@rootObject --> <!-- $$$sceneResized[overload1]$$$sceneResizedQSize --> <h3 class="fn"><a name="sceneResized"></a><span class="type">void</span> QDeclarativeView::<span class="name">sceneResized</span> ( <span class="type"><a href="qsize.html">QSize</a></span> <i>size</i> )<tt> [signal]</tt></h3> <p>This signal is emitted when the view is resized to <i>size</i>.</p> <!-- @@@sceneResized --> <!-- $$$statusChanged[overload1]$$$statusChangedQDeclarativeView::Status --> <h3 class="fn"><a name="statusChanged"></a><span class="type">void</span> QDeclarativeView::<span class="name">statusChanged</span> ( <span class="type"><a href="qdeclarativeview.html#Status-enum">QDeclarativeView::Status</a></span> <i>status</i> )<tt> [signal]</tt></h3> <p>This signal is emitted when the component's current <i>status</i> changes.</p> <!-- @@@statusChanged --> </div> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> 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.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>