Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QTemporaryFile::setFileTemplate ( const QString name )

Sets the static portion of the file name to name. If the file template ends in 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.

If name contains a relative file path, the path will be relative to the current working directory. You can use QDir::tempPath() to construct name if you want use the system's temporary directory.

See also:
fileTemplate()

Definition at line 670 of file qtemporaryfile.cpp.

References fileEngine(), QIODevice::isOpen(), and QAbstractFileEngine::setFileName().

Referenced by QTemporaryFile().

{
    Q_ASSERT(!isOpen());
    Q_D(QTemporaryFile);
    fileEngine()->setFileName(name);
    d->templateName = name;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index