aboutsummaryrefslogtreecommitdiffstats
path: root/doc/codesnippets/doc/src/snippets/code/src_corelib_io_qtemporaryfile.cpp
blob: 77d394e57b9e0b1b8673d76f9668b759b19e8858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{
//! [0]
    # Within a function/method...

    file_ = QTemporaryFile()
    if file_.open():
        # file_.fileName() returns the unique file name

    # The QTemporaryFile destructor removes the temporary file
    # as it goes out of scope.
//! [0]
}