Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 6249

qt-doc-4.8.5-10.fc18.noarch.rpm

<?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" />
<!-- qresource.cpp -->
  <title>Qt 4.8: QResource 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 &amp; 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>&nbsp;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 &amp; 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>QResource</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="#static-public-members">Static Public Members</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="#dynamic-resource-loading">Dynamic Resource Loading</a></li>
</ul>
</div>
<h1 class="title">QResource Class Reference</h1>
<!-- $$$QResource-brief -->
<p>The QResource class provides an interface for reading directly from resources. <a href="#details">More...</a></p>
<!-- @@@QResource -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QResource&gt;</span></pre><p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qresource-members.html">List of all members, including inherited members</a></li>
<li><a href="qresource-obsolete.html">Obsolete 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="qresource.html#QResource">QResource</a></b> ( const QString &amp; <i>file</i> = QString(), const QLocale &amp; <i>locale</i> = QLocale() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#dtor.QResource">~QResource</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#absoluteFilePath">absoluteFilePath</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const uchar * </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#data">data</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#fileName">fileName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#isCompressed">isCompressed</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLocale </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#locale">locale</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#setFileName">setFileName</a></b> ( const QString &amp; <i>file</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#setLocale">setLocale</a></b> ( const QLocale &amp; <i>locale</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#size">size</a></b> () const</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#registerResource">registerResource</a></b> ( const QString &amp; <i>rccFileName</i>, const QString &amp; <i>mapRoot</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#registerResource-2">registerResource</a></b> ( const uchar * <i>rccData</i>, const QString &amp; <i>mapRoot</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#unregisterResource">unregisterResource</a></b> ( const QString &amp; <i>rccFileName</i>, const QString &amp; <i>mapRoot</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#unregisterResource-2">unregisterResource</a></b> ( const uchar * <i>rccData</i>, const QString &amp; <i>mapRoot</i> = QString() )</td></tr>
</table>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#children">children</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#isDir">isDir</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qresource.html#isFile">isFile</a></b> () const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QResource-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QResource class provides an interface for reading directly from resources.</p>
<p>QResource is an object that represents a set of data (and possibly children) relating to a single resource entity. QResource gives direct access to the bytes in their raw format. In this way direct access allows reading data without buffer copying or indirection. Indirection is often useful when interacting with the resource entity as if it is a file, this can be achieved with <a href="qfile.html">QFile</a>. The data and children behind a QResource are normally compiled into an application/library, but it is also possible to load a resource at runtime. When loaded at run time the resource file will be loaded as one big set of data and then given out in pieces via references into the resource tree.</p>
<p>A QResource can either be loaded with an absolute path, either treated as a file system rooted with a <tt>/</tt> character, or in resource notation rooted with a <tt>:</tt> character. A relative resource can also be opened which will be found in the list of paths returned by <a href="qdir.html#searchPaths">QDir::searchPaths</a>().</p>
<p>A QResource that is representing a file will have data backing it, this data can possibly be compressed, in which case <a href="qbytearray.html#qUncompress">qUncompress</a>() must be used to access the real data; this happens implicitly when accessed through a <a href="qfile.html">QFile</a>. A QResource that is representing a directory will have only children and no data.</p>
<a name="dynamic-resource-loading"></a>
<h3>Dynamic Resource Loading</h3>
<p>A resource can be left out of an application's binary and loaded when it is needed at run-time by using the <a href="qresource.html#registerResource">registerResource</a>() function. The resource file passed into <a href="qresource.html#registerResource">registerResource</a>() must be a binary resource as created by rcc. Further information about binary resources can be found in <a href="resources.html">The Qt Resource System</a> documentation.</p>
<p>This can often be useful when loading a large set of application icons that may change based on a setting, or that can be edited by a user and later recreated. The resource is immediately loaded into memory, either as a result of a single file read operation, or as a memory mapped file.</p>
<p>This approach can prove to be a significant performance gain as only a single file will be loaded, and pieces of data will be given out via the path requested in <a href="qresource.html#setFileName">setFileName</a>().</p>
<p>The <a href="qresource.html#unregisterResource">unregisterResource</a>() function removes a reference to a particular file. If there are QResources that currently reference resources related to the unregistered file, they will continue to be valid but the resource file itself will be removed from the resource roots, and thus no further QResource can be created pointing into this resource data. The resource itself will be unmapped from memory when the last QResource that points to it is destroyed.</p>
</div>
<p><b>See also </b><a href="resources.html">The Qt Resource System</a>, <a href="qfile.html">QFile</a>, <a href="qdir.html">QDir</a>, and <a href="qfileinfo.html">QFileInfo</a>.</p>
<!-- @@@QResource -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QResource[overload1]$$$QResourceconstQString&constQLocale& -->
<h3 class="fn"><a name="QResource"></a>QResource::<span class="name">QResource</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>file</i> = QString(), const <span class="type"><a href="qlocale.html">QLocale</a></span> &amp; <i>locale</i> = QLocale() )</h3>
<p>Constructs a <a href="qresource.html">QResource</a> pointing to <i>file</i>. <i>locale</i> is used to load a specific localization of a resource data.</p>
<p><b>See also </b><a href="qfileinfo.html">QFileInfo</a>, <a href="qdir.html#searchPaths">QDir::searchPaths</a>(), <a href="qresource.html#setFileName">setFileName</a>(), and <a href="qresource.html#setLocale">setLocale</a>().</p>
<!-- @@@QResource -->
<!-- $$$~QResource[overload1]$$$~QResource -->
<h3 class="fn"><a name="dtor.QResource"></a>QResource::<span class="name">~QResource</span> ()</h3>
<p>Releases the resources of the <a href="qresource.html">QResource</a> object.</p>
<!-- @@@~QResource -->
<!-- $$$absoluteFilePath[overload1]$$$absoluteFilePath -->
<h3 class="fn"><a name="absoluteFilePath"></a><span class="type"><a href="qstring.html">QString</a></span> QResource::<span class="name">absoluteFilePath</span> () const</h3>
<p>Returns the real path that this <a href="qresource.html">QResource</a> represents, if the resource was found via the <a href="qdir.html#searchPaths">QDir::searchPaths</a>() it will be indicated in the path.</p>
<p><b>See also </b><a href="qresource.html#fileName">fileName</a>().</p>
<!-- @@@absoluteFilePath -->
<!-- $$$children[overload1]$$$children -->
<h3 class="fn"><a name="children"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QResource::<span class="name">children</span> () const<tt> [protected]</tt></h3>
<p>Returns a list of all resources in this directory, if the resource represents a file the list will be empty.</p>
<p><b>See also </b><a href="qresource.html#isDir">isDir</a>().</p>
<!-- @@@children -->
<!-- $$$data[overload1]$$$data -->
<h3 class="fn"><a name="data"></a>const <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> * QResource::<span class="name">data</span> () const</h3>
<p>Returns direct access to a read only segment of data that this resource represents. If the resource is compressed the data returns is compressed and <a href="qbytearray.html#qUncompress">qUncompress</a>() must be used to access the data. If the resource is a directory 0 is returned.</p>
<p><b>See also </b><a href="qresource.html#size">size</a>(), <a href="qresource.html#isCompressed">isCompressed</a>(), and <a href="qresource.html#isFile">isFile</a>().</p>
<!-- @@@data -->
<!-- $$$fileName[overload1]$$$fileName -->
<h3 class="fn"><a name="fileName"></a><span class="type"><a href="qstring.html">QString</a></span> QResource::<span class="name">fileName</span> () const</h3>
<p>Returns the full path to the file that this <a href="qresource.html">QResource</a> represents as it was passed.</p>
<p><b>See also </b><a href="qresource.html#setFileName">setFileName</a>() and <a href="qresource.html#absoluteFilePath">absoluteFilePath</a>().</p>
<!-- @@@fileName -->
<!-- $$$isCompressed[overload1]$$$isCompressed -->
<h3 class="fn"><a name="isCompressed"></a><span class="type">bool</span> QResource::<span class="name">isCompressed</span> () const</h3>
<p>Returns true if the resource represents a file and the data backing it is in a compressed format, false otherwise.</p>
<p><b>See also </b><a href="qresource.html#data">data</a>() and <a href="qresource.html#isFile">isFile</a>().</p>
<!-- @@@isCompressed -->
<!-- $$$isDir[overload1]$$$isDir -->
<h3 class="fn"><a name="isDir"></a><span class="type">bool</span> QResource::<span class="name">isDir</span> () const<tt> [protected]</tt></h3>
<p>Returns true if the resource represents a directory and thus may have <a href="qresource.html#children">children</a>() in it, false if it represents a file.</p>
<p><b>See also </b><a href="qresource.html#isFile">isFile</a>().</p>
<!-- @@@isDir -->
<!-- $$$isFile[overload1]$$$isFile -->
<h3 class="fn"><a name="isFile"></a><span class="type">bool</span> QResource::<span class="name">isFile</span> () const<tt> [protected]</tt></h3>
<p>Returns true if the resource represents a file and thus has data backing it, false if it represents a directory.</p>
<p><b>See also </b><a href="qresource.html#isDir">isDir</a>().</p>
<!-- @@@isFile -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QResource::<span class="name">isValid</span> () const</h3>
<p>Returns true if the resource really exists in the resource hierarchy, false otherwise.</p>
<!-- @@@isValid -->
<!-- $$$locale[overload1]$$$locale -->
<h3 class="fn"><a name="locale"></a><span class="type"><a href="qlocale.html">QLocale</a></span> QResource::<span class="name">locale</span> () const</h3>
<p>Returns the locale used to locate the data for the <a href="qresource.html">QResource</a>.</p>
<p><b>See also </b><a href="qresource.html#setLocale">setLocale</a>().</p>
<!-- @@@locale -->
<!-- $$$registerResource[overload1]$$$registerResourceconstQString&constQString& -->
<h3 class="fn"><a name="registerResource"></a><span class="type">bool</span> QResource::<span class="name">registerResource</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>rccFileName</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>mapRoot</i> = QString() )<tt> [static]</tt></h3>
<p>Registers the resource with the given <i>rccFileName</i> at the location in the resource tree specified by <i>mapRoot</i>, and returns true if the file is successfully opened; otherwise returns false.</p>
<p><b>See also </b><a href="qresource.html#unregisterResource">unregisterResource</a>().</p>
<!-- @@@registerResource -->
<!-- $$$registerResource$$$registerResourceconstuchar*constQString& -->
<h3 class="fn"><a name="registerResource-2"></a><span class="type">bool</span> QResource::<span class="name">registerResource</span> ( const <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> * <i>rccData</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>mapRoot</i> = QString() )<tt> [static]</tt></h3>
<p>Registers the resource with the given <i>rccData</i> at the location in the resource tree specified by <i>mapRoot</i>, and returns true if the file is successfully opened; otherwise returns false.</p>
<p><b>Warning:</b> The data must remain valid throughout the life of any <a href="qfile.html">QFile</a> that may reference the resource data.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qresource.html#unregisterResource">unregisterResource</a>().</p>
<!-- @@@registerResource -->
<!-- $$$setFileName[overload1]$$$setFileNameconstQString& -->
<h3 class="fn"><a name="setFileName"></a><span class="type">void</span> QResource::<span class="name">setFileName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>file</i> )</h3>
<p>Sets a <a href="qresource.html">QResource</a> to point to <i>file</i>. <i>file</i> can either be absolute, in which case it is opened directly, if relative then the file will be tried to be found in <a href="qdir.html#searchPaths">QDir::searchPaths</a>().</p>
<p><b>See also </b><a href="qresource.html#fileName">fileName</a>() and <a href="qresource.html#absoluteFilePath">absoluteFilePath</a>().</p>
<!-- @@@setFileName -->
<!-- $$$setLocale[overload1]$$$setLocaleconstQLocale& -->
<h3 class="fn"><a name="setLocale"></a><span class="type">void</span> QResource::<span class="name">setLocale</span> ( const <span class="type"><a href="qlocale.html">QLocale</a></span> &amp; <i>locale</i> )</h3>
<p>Sets a <a href="qresource.html">QResource</a> to only load the localization of resource to for <i>locale</i>. If a resource for the specific locale is not found then the C locale is used.</p>
<p><b>See also </b><a href="qresource.html#locale">locale</a>() and <a href="qresource.html#setFileName">setFileName</a>().</p>
<!-- @@@setLocale -->
<!-- $$$size[overload1]$$$size -->
<h3 class="fn"><a name="size"></a><span class="type"><a href="qtglobal.html#qint64-typedef">qint64</a></span> QResource::<span class="name">size</span> () const</h3>
<p>Returns the size of the data backing the resource.</p>
<p><b>See also </b><a href="qresource.html#data">data</a>() and <a href="qresource.html#isFile">isFile</a>().</p>
<!-- @@@size -->
<!-- $$$unregisterResource[overload1]$$$unregisterResourceconstQString&constQString& -->
<h3 class="fn"><a name="unregisterResource"></a><span class="type">bool</span> QResource::<span class="name">unregisterResource</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>rccFileName</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>mapRoot</i> = QString() )<tt> [static]</tt></h3>
<p>Unregisters the resource with the given <i>rccFileName</i> at the location in the resource tree specified by <i>mapRoot</i>, and returns true if the resource is successfully unloaded and no references exist for the resource; otherwise returns false.</p>
<p><b>See also </b><a href="qresource.html#registerResource">registerResource</a>().</p>
<!-- @@@unregisterResource -->
<!-- $$$unregisterResource$$$unregisterResourceconstuchar*constQString& -->
<h3 class="fn"><a name="unregisterResource-2"></a><span class="type">bool</span> QResource::<span class="name">unregisterResource</span> ( const <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> * <i>rccData</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>mapRoot</i> = QString() )<tt> [static]</tt></h3>
<p>Unregisters the resource with the given <i>rccData</i> at the location in the resource tree specified by <i>mapRoot</i>, and returns true if the resource is successfully unloaded and no references exist into the resource; otherwise returns false.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qresource.html#registerResource">registerResource</a>().</p>
<!-- @@@unregisterResource -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</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>