Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 798

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtemporaryfile.cpp -->
  <title>QTemporaryFile Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QTemporaryFile</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </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-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QTemporaryFile Class</h1>
<!-- $$$QTemporaryFile-brief -->
<p>The <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> class is an I/O device that operates on temporary files. <a href="#details">More...</a></p>
<!-- @@@QTemporaryFile -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QTemporaryFile&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qfile.html">QFile</a></td></tr></table></div><ul>
<li><a href="qtemporaryfile-members.html">List of all members, including inherited members</a></li>
<li><a href="qtemporaryfile-obsolete.html">Obsolete members</a></li>
</ul>
<p><b>Note:</b> All functions in this class are reentrant.</p>
<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="qtemporaryfile.html#QTemporaryFile">QTemporaryFile</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#QTemporaryFile-1">QTemporaryFile</a></b>(const QString &amp;<i>templateName</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#QTemporaryFile-2">QTemporaryFile</a></b>(QObject *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#QTemporaryFile-3">QTemporaryFile</a></b>(const QString &amp;<i>templateName</i>, QObject *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#dtor.QTemporaryFile">~QTemporaryFile</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#autoRemove">autoRemove</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#fileTemplate">fileTemplate</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#open">open</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#setAutoRemove">setAutoRemove</a></b>(bool <i>b</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#setFileTemplate">setFileTemplate</a></b>(const QString &amp;<i>name</i>)</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#fileName">fileName</a></b>() const</td></tr>
</table></div>
<ul>
<li class="fn">15 public functions inherited from <a href="qfile.html#public-functions">QFile</a></li>
<li class="fn">16 public functions inherited from <a href="qfiledevice.html#public-functions">QFileDevice</a></li>
<li class="fn">43 public functions inherited from <a href="qiodevice.html#public-functions">QIODevice</a></li>
<li class="fn">32 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QTemporaryFile *</td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#createNativeFile">createNativeFile</a></b>(QFile &amp;<i>file</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTemporaryFile *</td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#createNativeFile-1">createNativeFile</a></b>(const QString &amp;<i>fileName</i>)</td></tr>
</table></div>
<ul>
<li class="fn">12 static public members inherited from <a href="qfile.html#static-public-members">QFile</a></li>
<li class="fn">11 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtemporaryfile.html#open-1">open</a></b>(OpenMode <i>flags</i>)</td></tr>
</table></div>
<ul>
<li class="fn">3 protected functions inherited from <a href="qfiledevice.html#protected-functions">QFileDevice</a></li>
<li class="fn">5 protected functions inherited from <a href="qiodevice.html#protected-functions">QIODevice</a></li>
<li class="fn">9 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">6 signals inherited from <a href="qiodevice.html#signals">QIODevice</a></li>
<li class="fn">2 signals inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">3 protected functions inherited from <a href="qfiledevice.html#protected-functions">QFileDevice</a></li>
<li class="fn">5 protected functions inherited from <a href="qiodevice.html#protected-functions">QIODevice</a></li>
<li class="fn">9 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QTemporaryFile-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> class is an I/O device that operates on temporary files.</p>
<p><a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> is used to create unique temporary files safely. The file itself is created by calling <a href="qtemporaryfile.html#open">open</a>(). The name of the temporary file is guaranteed to be unique (i.e&#x2e;, you are guaranteed to not overwrite an existing file), and the file will subsequently be removed upon destruction of the <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> object. This is an important technique that avoids data corruption for applications that store data in temporary files. The file name is either auto-generated, or created based on a template, which is passed to <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a>'s constructor.</p>
<p>Example:</p>
<pre class="cpp">

      <span class="comment">// Within a function/method...</span>

      <span class="type"><a href="qtemporaryfile.html#QTemporaryFile">QTemporaryFile</a></span> file;
      <span class="keyword">if</span> (file<span class="operator">.</span>open()) {
          <span class="comment">// file.fileName() returns the unique file name</span>
      }

      <span class="comment">// The QTemporaryFile destructor removes the temporary file</span>
      <span class="comment">// as it goes out of scope.</span>

</pre>
<p>Reopening a <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> after calling <a href="qfiledevice.html#close">close</a>() is safe. For as long as the <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> object itself is not destroyed, the unique temporary file will exist and be kept open internally by <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a>.</p>
<p>The file name of the temporary file can be found by calling <a href="qtemporaryfile.html#fileName">fileName</a>(). Note that this is only defined after the file is first opened; the function returns an empty string before this.</p>
<p>A temporary file will have some static part of the name and some part that is calculated to be unique. The default filename will be determined from <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::applicationName</a>() (otherwise <code>qt_temp</code>) and will be placed into the temporary path as returned by <a href="qdir.html#tempPath">QDir::tempPath</a>(). If you specify your own filename, a relative file path will not be placed in the temporary directory by default, but be relative to the current working directory.</p>
<p>Specified filenames can contain the following template <code>XXXXXX</code> (six upper case &quot;X&quot; characters), which will be replaced by the auto-generated portion of the filename. Note that the template is case sensitive. If the template is not present in the filename, <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> appends the generated part to the filename given.</p>
</div>
<p><b>See also </b><a href="qdir.html#tempPath">QDir::tempPath</a>() and <a href="qfile.html">QFile</a>.</p>
<!-- @@@QTemporaryFile -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTemporaryFile[overload1]$$$QTemporaryFile -->
<h3 class="fn" id="QTemporaryFile"><a name="QTemporaryFile"></a>QTemporaryFile::<span class="name">QTemporaryFile</span>()</h3>
<p>Constructs a <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> using as file template the application name returned by <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::applicationName</a>() (otherwise <code>qt_temp</code>) followed by &quot;.XXXXXX&quot;. The file is stored in the system's temporary directory, <a href="qdir.html#tempPath">QDir::tempPath</a>().</p>
<p><b>See also </b><a href="qtemporaryfile.html#setFileTemplate">setFileTemplate</a>() and <a href="qdir.html#tempPath">QDir::tempPath</a>().</p>
<!-- @@@QTemporaryFile -->
<!-- $$$QTemporaryFile$$$QTemporaryFileconstQString& -->
<h3 class="fn" id="QTemporaryFile-1"><a name="QTemporaryFile-1"></a>QTemporaryFile::<span class="name">QTemporaryFile</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>templateName</i>)</h3>
<p>Constructs a <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> with a template filename of <i>templateName</i>. Upon opening the temporary file this will be used to create a unique filename.</p>
<p>If the <i>templateName</i> does not contain XXXXXX it will automatically be appended and used as the dynamic portion of the filename.</p>
<p>If <i>templateName</i> is a relative path, the path will be relative to the current working directory. You can use <a href="qdir.html#tempPath">QDir::tempPath</a>() to construct <i>templateName</i> if you want use the system's temporary directory.</p>
<p><b>See also </b><a href="qtemporaryfile.html#open">open</a>() and <a href="qtemporaryfile.html#fileTemplate">fileTemplate</a>().</p>
<!-- @@@QTemporaryFile -->
<!-- $$$QTemporaryFile$$$QTemporaryFileQObject* -->
<h3 class="fn" id="QTemporaryFile-2"><a name="QTemporaryFile-2"></a>QTemporaryFile::<span class="name">QTemporaryFile</span>(<span class="type"><a href="qobject.html#QObject">QObject</a></span> *<i>parent</i>)</h3>
<p>Constructs a <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> (with the given <i>parent</i>) using as file template the application name returned by <a href="qcoreapplication.html#applicationName-prop">QCoreApplication::applicationName</a>() (otherwise <code>qt_temp</code>) followed by &quot;.XXXXXX&quot;. The file is stored in the system's temporary directory, <a href="qdir.html#tempPath">QDir::tempPath</a>().</p>
<p><b>See also </b><a href="qtemporaryfile.html#setFileTemplate">setFileTemplate</a>().</p>
<!-- @@@QTemporaryFile -->
<!-- $$$QTemporaryFile$$$QTemporaryFileconstQString&QObject* -->
<h3 class="fn" id="QTemporaryFile-3"><a name="QTemporaryFile-3"></a>QTemporaryFile::<span class="name">QTemporaryFile</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>templateName</i>, <span class="type"><a href="qobject.html#QObject">QObject</a></span> *<i>parent</i>)</h3>
<p>Constructs a <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> with a template filename of <i>templateName</i> and the specified <i>parent</i>. Upon opening the temporary file this will be used to create a unique filename.</p>
<p>If the <i>templateName</i> does not contain XXXXXX it will automatically be appended and used as the dynamic portion of the filename.</p>
<p>If <i>templateName</i> is a relative path, the path will be relative to the current working directory. You can use <a href="qdir.html#tempPath">QDir::tempPath</a>() to construct <i>templateName</i> if you want use the system's temporary directory.</p>
<p><b>See also </b><a href="qtemporaryfile.html#open">open</a>() and <a href="qtemporaryfile.html#fileTemplate">fileTemplate</a>().</p>
<!-- @@@QTemporaryFile -->
<!-- $$$~QTemporaryFile[overload1]$$$~QTemporaryFile -->
<h3 class="fn" id="dtor.QTemporaryFile"><a name="dtor.QTemporaryFile"></a>QTemporaryFile::<span class="name">~QTemporaryFile</span>()</h3>
<p>Destroys the temporary file object, the file is automatically closed if necessary and if in auto remove mode it will automatically delete the file.</p>
<p><b>See also </b><a href="qtemporaryfile.html#autoRemove">autoRemove</a>().</p>
<!-- @@@~QTemporaryFile -->
<!-- $$$autoRemove[overload1]$$$autoRemove -->
<h3 class="fn" id="autoRemove"><a name="autoRemove"></a><span class="type">bool</span> QTemporaryFile::<span class="name">autoRemove</span>() const</h3>
<p>Returns <code>true</code> if the <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> is in auto remove mode. Auto-remove mode will automatically delete the filename from disk upon destruction. This makes it very easy to create your <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> object on the stack, fill it with data, read from it, and finally on function return it will automatically clean up after itself.</p>
<p>Auto-remove is on by default.</p>
<p><b>See also </b><a href="qtemporaryfile.html#setAutoRemove">setAutoRemove</a>() and <a href="qfile.html#remove">remove</a>().</p>
<!-- @@@autoRemove -->
<!-- $$$createNativeFile[overload1]$$$createNativeFileQFile& -->
<h3 class="fn" id="createNativeFile"><a name="createNativeFile"></a><code>[static] </code><span class="type"><a href="qtemporaryfile.html#QTemporaryFile">QTemporaryFile</a></span> *QTemporaryFile::<span class="name">createNativeFile</span>(<span class="type"><a href="qfile.html#QFile">QFile</a></span> &amp;<i>file</i>)</h3>
<p>If <i>file</i> is not already a native file, then a <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> is created in <a href="qdir.html#tempPath">QDir::tempPath</a>(), the contents of <i>file</i> is copied into it, and a pointer to the temporary file is returned. Does nothing and returns <code>0</code> if <i>file</i> is already a native file.</p>
<p>For example:</p>
<pre class="cpp">

  <span class="type"><a href="qfile.html#QFile">QFile</a></span> f(<span class="string">&quot;:/resources/file.txt&quot;</span>);
  <span class="type"><a href="qtemporaryfile.html#QTemporaryFile">QTemporaryFile</a></span><span class="operator">::</span>createNativeFile(f); <span class="comment">// Returns a pointer to a temporary file</span>

  <span class="type"><a href="qfile.html#QFile">QFile</a></span> f(<span class="string">&quot;/users/qt/file.txt&quot;</span>);
  <span class="type"><a href="qtemporaryfile.html#QTemporaryFile">QTemporaryFile</a></span><span class="operator">::</span>createNativeFile(f); <span class="comment">// Returns 0</span>

</pre>
<p><b>See also </b><a href="qfileinfo.html#isNativePath">QFileInfo::isNativePath</a>().</p>
<!-- @@@createNativeFile -->
<!-- $$$createNativeFile$$$createNativeFileconstQString& -->
<h3 class="fn" id="createNativeFile-1"><a name="createNativeFile-1"></a><code>[static] </code><span class="type"><a href="qtemporaryfile.html#QTemporaryFile">QTemporaryFile</a></span> *QTemporaryFile::<span class="name">createNativeFile</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>fileName</i>)</h3>
<p>This is an overloaded function.</p>
<p>Works on the given <i>fileName</i> rather than an existing <a href="qfile.html">QFile</a> object.</p>
<!-- @@@createNativeFile -->
<!-- $$$fileName[overload1]$$$fileName -->
<h3 class="fn" id="fileName"><a name="fileName"></a><code>[virtual] </code><span class="type"><a href="qstring.html">QString</a></span> QTemporaryFile::<span class="name">fileName</span>() const</h3>
<p>Reimplemented from <a href="qfiledevice.html#fileName">QFileDevice::fileName</a>().</p>
<p>Returns the complete unique filename backing the <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> object. This string is null before the <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> is opened, afterwards it will contain the <a href="qtemporaryfile.html#fileTemplate">fileTemplate</a>() plus additional characters to make it unique.</p>
<p><b>See also </b><a href="qtemporaryfile.html#fileTemplate">fileTemplate</a>().</p>
<!-- @@@fileName -->
<!-- $$$fileTemplate[overload1]$$$fileTemplate -->
<h3 class="fn" id="fileTemplate"><a name="fileTemplate"></a><span class="type"><a href="qstring.html">QString</a></span> QTemporaryFile::<span class="name">fileTemplate</span>() const</h3>
<p>Returns the set file template. The default file template will be called qcoreappname.XXXXXX and be placed in <a href="qdir.html#tempPath">QDir::tempPath</a>().</p>
<p><b>See also </b><a href="qtemporaryfile.html#setFileTemplate">setFileTemplate</a>().</p>
<!-- @@@fileTemplate -->
<!-- $$$open[overload1]$$$open -->
<h3 class="fn" id="open"><a name="open"></a><span class="type">bool</span> QTemporaryFile::<span class="name">open</span>()</h3>
<p>A <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> will always be opened in <a href="qiodevice.html#OpenModeFlag-enum">QIODevice::ReadWrite</a> mode, this allows easy access to the data in the file. This function will return true upon success and will set the <a href="qtemporaryfile.html#fileName">fileName</a>() to the unique filename used.</p>
<p><b>See also </b><a href="qtemporaryfile.html#fileName">fileName</a>().</p>
<!-- @@@open -->
<!-- $$$open$$$openOpenMode -->
<h3 class="fn" id="open-1"><a name="open-1"></a><code>[virtual protected] </code><span class="type">bool</span> QTemporaryFile::<span class="name">open</span>(<span class="type"><a href="qiodevice.html#OpenModeFlag-enum">OpenMode</a></span> <i>flags</i>)</h3>
<p>Reimplemented from <a href="qiodevice.html#open">QIODevice::open</a>().</p>
<p>Creates a unique file name for the temporary file, and opens it. You can get the unique name later by calling <a href="qtemporaryfile.html#fileName">fileName</a>(). The file is guaranteed to have been created by this function (i.e&#x2e;, it has never existed before).</p>
<!-- @@@open -->
<!-- $$$setAutoRemove[overload1]$$$setAutoRemovebool -->
<h3 class="fn" id="setAutoRemove"><a name="setAutoRemove"></a><span class="type">void</span> QTemporaryFile::<span class="name">setAutoRemove</span>(<span class="type">bool</span> <i>b</i>)</h3>
<p>Sets the <a href="qtcore-attribution-qtemporaryfile.html#qtemporaryfile">QTemporaryFile</a> into auto-remove mode if <i>b</i> is true.</p>
<p>Auto-remove is on by default.</p>
<p><b>See also </b><a href="qtemporaryfile.html#autoRemove">autoRemove</a>() and <a href="qfile.html#remove">remove</a>().</p>
<!-- @@@setAutoRemove -->
<!-- $$$setFileTemplate[overload1]$$$setFileTemplateconstQString& -->
<h3 class="fn" id="setFileTemplate"><a name="setFileTemplate"></a><span class="type">void</span> QTemporaryFile::<span class="name">setFileTemplate</span>(const <span class="type"><a href="qstring.html">QString</a></span> &amp;<i>name</i>)</h3>
<p>Sets the static portion of the file name to <i>name</i>. If the file template contains XXXXXX that will automatically be replaced with the unique part of the filename, otherwise a filename will be determined automatically based on the static portion specified.</p>
<p>If <i>name</i> contains a relative file path, the path will be relative to the current working directory. You can use <a href="qdir.html#tempPath">QDir::tempPath</a>() to construct <i>name</i> if you want use the system's temporary directory.</p>
<p><b>See also </b><a href="qtemporaryfile.html#fileTemplate">fileTemplate</a>().</p>
<!-- @@@setFileTemplate -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 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>