


If you specify your own path, a relative path will not be placed in the temporary directory by default, but be relative to the current working directory. The default path will be determined from QCoreApplication::applicationName() (otherwise qt_temp) and will be placed into the temporary path as returned by QDir::tempPath(). The path to the temporary directory can be found by calling path().Ī temporary directory will have some static part of the name and some part that is calculated to be unique. Do not use exists(), since a default-constructed QDir represents the current directory, which exists. It is very important to test that the temporary directory could be created, using isValid(). The QTemporaryDir destructor removes the temporary directory // as it goes out of scope. dir.path() returns the unique directory path
