<?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" /> <!-- qpointer.cpp --> <title>Qt 4.8: QPointer 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="qtcore.html">QtCore</a></li> <li>QPointer</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-functions">Public Functions</a></li> <li class="level1"><a href="#related-non-members">Related Non-Members</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">QPointer Class Reference</h1> <!-- $$$QPointer-brief --> <p>The QPointer class is a template class that provides guarded pointers to <a href="qobject.html">QObject</a>. <a href="#details">More...</a></p> <!-- @@@QPointer --> <pre class="cpp"> <span class="preprocessor">#include <QPointer></span></pre><ul> <li><a href="qpointer-members.html">List of all members, including inherited members</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="qpointer.html#QPointer">QPointer</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#QPointer-2">QPointer</a></b> ( T * <i>p</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#QPointer-3">QPointer</a></b> ( const QPointer<T> & <i>p</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#dtor.QPointer">~QPointer</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> T * </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#data">data</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#isNull">isNull</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-T--2a">operator T *</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> T & </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-2a">operator*</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> T * </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator--gt">operator-></a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPointer<T> & </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-eq">operator=</a></b> ( const QPointer<T> & <i>p</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> QPointer<T> & </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-eq-2">operator=</a></b> ( T * <i>p</i> )</td></tr> </table> <a name="related-non-members"></a> <h2>Related Non-Members</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-not-eq-52">operator!=</a></b> ( const T * <i>o</i>, const QPointer<T> & <i>p</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-not-eq-53">operator!=</a></b> ( const QPointer<T> & <i>p</i>, const T * <i>o</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-not-eq-54">operator!=</a></b> ( T * <i>o</i>, const QPointer<T> & <i>p</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-not-eq-55">operator!=</a></b> ( const QPointer<T> & <i>p</i>, T * <i>o</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-not-eq-56">operator!=</a></b> ( const QPointer<T> & <i>p1</i>, const QPointer<T> & <i>p2</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-eq-eq-73">operator==</a></b> ( const T * <i>o</i>, const QPointer<T> & <i>p</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-eq-eq-74">operator==</a></b> ( const QPointer<T> & <i>p</i>, const T * <i>o</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-eq-eq-75">operator==</a></b> ( T * <i>o</i>, const QPointer<T> & <i>p</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-eq-eq-76">operator==</a></b> ( const QPointer<T> & <i>p</i>, T * <i>o</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointer.html#operator-eq-eq-77">operator==</a></b> ( const QPointer<T> & <i>p1</i>, const QPointer<T> & <i>p2</i> )</td></tr> </table> <a name="details"></a> <!-- $$$QPointer-description --> <div class="descr"> <h2>Detailed Description</h2> <p>The QPointer class is a template class that provides guarded pointers to <a href="qobject.html">QObject</a>.</p> <p>A guarded pointer, QPointer<T>, behaves like a normal C++ pointer <tt>T *</tt>, except that it is automatically set to 0 when the referenced object is destroyed (unlike normal C++ pointers, which become "dangling pointers" in such cases). <tt>T</tt> must be a subclass of <a href="qobject.html">QObject</a>.</p> <p>Guarded pointers are useful whenever you need to store a pointer to a <a href="qobject.html">QObject</a> that is owned by someone else, and therefore might be destroyed while you still hold a reference to it. You can safely test the pointer for validity.</p> <p>Qt also provides <a href="qsharedpointer.html">QSharedPointer</a>, an implementation of a reference-counted shared pointer object, which can be used to maintain a collection of references to an individual pointer.</p> <p>Example:</p> <pre class="cpp"> <span class="type">QPointer</span><span class="operator"><</span><span class="type"><a href="qlabel.html">QLabel</a></span><span class="operator">></span> label <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>; label<span class="operator">-</span><span class="operator">></span>setText(<span class="string">"&Status:"</span>); ... <span class="keyword">if</span> (label) label<span class="operator">-</span><span class="operator">></span>show();</pre> <p>If the <a href="qlabel.html">QLabel</a> is deleted in the meantime, the <tt>label</tt> variable will hold 0 instead of an invalid address, and the last line will never be executed.</p> <p>The functions and operators available with a QPointer are the same as those available with a normal unguarded pointer, except the pointer arithmetic operators (<tt>+</tt>, <tt>-</tt>, <tt>++</tt>, and <tt>--</tt>), which are normally used only with arrays of objects.</p> <p>Use QPointers like normal pointers and you will not need to read this class documentation.</p> <p>For creating guarded pointers, you can construct or assign to them from a T* or from another guarded pointer of the same type. You can compare them with each other using operator==() and operator!=(), or test for 0 with <a href="qpointer.html#isNull">isNull</a>(). You can dereference them using either the <tt>*x</tt> or the <tt>x->member</tt> notation.</p> <p>A guarded pointer will automatically cast to a <tt>T</tt> *, so you can freely mix guarded and unguarded pointers. This means that if you have a QPointer<<a href="qwidget.html">QWidget</a>>, you can pass it to a function that requires a <a href="qwidget.html">QWidget</a> *. For this reason, it is of little value to declare functions to take a QPointer as a parameter; just use normal pointers. Use a QPointer when you are storing a pointer over time.</p> <p>Note that class <tt>T</tt> must inherit <a href="qobject.html">QObject</a>, or a compilation or link error will result.</p> </div> <p><b>See also </b><a href="qsharedpointer.html">QSharedPointer</a>, <a href="qweakpointer.html">QWeakPointer</a>, <a href="qobject.html">QObject</a>, and <a href="qobjectcleanuphandler.html">QObjectCleanupHandler</a>.</p> <!-- @@@QPointer --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QPointer[overload1]$$$QPointer --> <h3 class="fn"><a name="QPointer"></a>QPointer::<span class="name">QPointer</span> ()</h3> <p>Constructs a 0 guarded pointer.</p> <p><b>See also </b><a href="qpointer.html#isNull">isNull</a>().</p> <!-- @@@QPointer --> <!-- $$$QPointer$$$QPointerT* --> <h3 class="fn"><a name="QPointer-2"></a>QPointer::<span class="name">QPointer</span> ( <span class="type">T</span> * <i>p</i> )</h3> <p>Constructs a guarded pointer that points to same object that <i>p</i> points to.</p> <!-- @@@QPointer --> <!-- $$$QPointer$$$QPointerconstQPointer<T>& --> <h3 class="fn"><a name="QPointer-3"></a>QPointer::<span class="name">QPointer</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i> )</h3> <p>Copies one guarded pointer from another. The constructed guarded pointer points to the same object that <i>p</i> points to (which may be 0).</p> <!-- @@@QPointer --> <!-- $$$~QPointer[overload1]$$$~QPointer --> <h3 class="fn"><a name="dtor.QPointer"></a>QPointer::<span class="name">~QPointer</span> ()</h3> <p>Destroys the guarded pointer. Just like a normal pointer, destroying a guarded pointer does <i>not</i> destroy the object being pointed to.</p> <!-- @@@~QPointer --> <!-- $$$data[overload1]$$$data --> <h3 class="fn"><a name="data"></a><span class="type">T</span> * QPointer::<span class="name">data</span> () const</h3> <p>Returns the pointer to the object being guarded.</p> <p>This function was introduced in Qt 4.4.</p> <!-- @@@data --> <!-- $$$isNull[overload1]$$$isNull --> <h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QPointer::<span class="name">isNull</span> () const</h3> <p>Returns <tt>true</tt> if the referenced object has been destroyed or if there is no referenced object; otherwise returns false.</p> <!-- @@@isNull --> <!-- $$$operator T *[overload1]$$$operator T * --> <h3 class="fn"><a name="operator-T--2a"></a>QPointer::<span class="name">operator T *</span> () const</h3> <p>Cast operator; implements pointer semantics. Because of this function you can pass a <a href="qpointer.html">QPointer</a><T> to a function where a T* is required.</p> <!-- @@@operator T * --> <!-- $$$operator*[overload1]$$$operator* --> <h3 class="fn"><a name="operator-2a"></a><span class="type">T</span> & QPointer::<span class="name">operator*</span> () const</h3> <p>Dereference operator; implements pointer semantics. Just use this operator as you would with a normal C++ pointer.</p> <!-- @@@operator* --> <!-- $$$operator->[overload1]$$$operator-> --> <h3 class="fn"><a name="operator--gt"></a><span class="type">T</span> * QPointer::<span class="name">operator-></span> () const</h3> <p>Overloaded arrow operator; implements pointer semantics. Just use this operator as you would with a normal C++ pointer.</p> <!-- @@@operator-> --> <!-- $$$operator=[overload1]$$$operator=constQPointer<T>& --> <h3 class="fn"><a name="operator-eq"></a><span class="type">QPointer</span><<span class="type">T</span>> & QPointer::<span class="name">operator=</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i> )</h3> <p>Assignment operator. This guarded pointer will now point to the same object that <i>p</i> points to.</p> <!-- @@@operator= --> <!-- $$$operator=$$$operator=T* --> <h3 class="fn"><a name="operator-eq-2"></a><span class="type">QPointer</span><<span class="type">T</span>> & QPointer::<span class="name">operator=</span> ( <span class="type">T</span> * <i>p</i> )</h3> <p>Assignment operator. This guarded pointer will now point to the same object that <i>p</i> points to.</p> <!-- @@@operator= --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> <!-- $$$operator!=$$$operator!=constT*constQPointer<T>& --> <h3 class="fn"><a name="operator-not-eq-52"></a><span class="type">bool</span> <span class="name">operator!=</span> ( const <span class="type">T</span> * <i>o</i>, const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i> )</h3> <p>Inequality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are not pointing to the same object, otherwise returns false.</p> <!-- @@@operator!= --> <!-- $$$operator!=$$$operator!=constQPointer<T>&constT* --> <h3 class="fn"><a name="operator-not-eq-53"></a><span class="type">bool</span> <span class="name">operator!=</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i>, const <span class="type">T</span> * <i>o</i> )</h3> <p>Inequality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are not pointing to the same object, otherwise returns false.</p> <!-- @@@operator!= --> <!-- $$$operator!=$$$operator!=T*constQPointer<T>& --> <h3 class="fn"><a name="operator-not-eq-54"></a><span class="type">bool</span> <span class="name">operator!=</span> ( <span class="type">T</span> * <i>o</i>, const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i> )</h3> <p>Inequality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are not pointing to the same object, otherwise returns false.</p> <!-- @@@operator!= --> <!-- $$$operator!=$$$operator!=constQPointer<T>&T* --> <h3 class="fn"><a name="operator-not-eq-55"></a><span class="type">bool</span> <span class="name">operator!=</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i>, <span class="type">T</span> * <i>o</i> )</h3> <p>Inequality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are not pointing to the same object, otherwise returns false.</p> <!-- @@@operator!= --> <!-- $$$operator!=$$$operator!=constQPointer<T>&constQPointer<T>& --> <h3 class="fn"><a name="operator-not-eq-56"></a><span class="type">bool</span> <span class="name">operator!=</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p1</i>, const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p2</i> )</h3> <p>Inequality operator. Returns true if the guarded pointers <i>p1</i> and <i>p2</i> are not pointing to the same object, otherwise returns false.</p> <!-- @@@operator!= --> <!-- $$$operator==$$$operator==constT*constQPointer<T>& --> <h3 class="fn"><a name="operator-eq-eq-73"></a><span class="type">bool</span> <span class="name">operator==</span> ( const <span class="type">T</span> * <i>o</i>, const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i> )</h3> <p>Equality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are pointing to the same object, otherwise returns false.</p> <!-- @@@operator== --> <!-- $$$operator==$$$operator==constQPointer<T>&constT* --> <h3 class="fn"><a name="operator-eq-eq-74"></a><span class="type">bool</span> <span class="name">operator==</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i>, const <span class="type">T</span> * <i>o</i> )</h3> <p>Equality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are pointing to the same object, otherwise returns false.</p> <!-- @@@operator== --> <!-- $$$operator==$$$operator==T*constQPointer<T>& --> <h3 class="fn"><a name="operator-eq-eq-75"></a><span class="type">bool</span> <span class="name">operator==</span> ( <span class="type">T</span> * <i>o</i>, const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i> )</h3> <p>Equality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are pointing to the same object, otherwise returns false.</p> <!-- @@@operator== --> <!-- $$$operator==$$$operator==constQPointer<T>&T* --> <h3 class="fn"><a name="operator-eq-eq-76"></a><span class="type">bool</span> <span class="name">operator==</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p</i>, <span class="type">T</span> * <i>o</i> )</h3> <p>Equality operator. Returns true if <i>o</i> and the guarded pointer <i>p</i> are pointing to the same object, otherwise returns false.</p> <!-- @@@operator== --> <!-- $$$operator==$$$operator==constQPointer<T>&constQPointer<T>& --> <h3 class="fn"><a name="operator-eq-eq-77"></a><span class="type">bool</span> <span class="name">operator==</span> ( const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p1</i>, const <span class="type">QPointer</span><<span class="type">T</span>> & <i>p2</i> )</h3> <p>Equality operator. Returns true if the guarded pointers <i>p1</i> and <i>p2</i> are pointing to the same object, otherwise returns false.</p> <!-- @@@operator== --> </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>