Qt 5.13 | Qt Labs Platform | QML Types | StandardPaths QML Type

Qt 5.13.2 Reference Documentation

# StandardPaths QML Type

Provides access to the standard system paths. More...

Import Statement: | import Qt.labs.platform 1.1
Since: | Qt 5.8

- List of all members, including inherited members

## Methods

- string displayName(type)
- url findExecutable(executableName, list<string> paths)
- url locate(type, string fileName, LocateOptions options = LocateFile)
- list<url> locateAll(type, string fileName, LocateOptions options = LocateFile)
- void setTestModeEnabled(testMode)
- list<url> standardLocations(type)
- url writableLocation(type)

## Detailed Description

The StandardPaths singleton type provides methods for querying the standard system paths. The standard paths are mostly useful in conjunction with the FileDialog and FolderDialog types.

      FileDialog {
          folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
      }

Note: Types in Qt.labs modules are not guaranteed to remain compatible in future versions.

See also FileDialog, FolderDialog, and QStandardPaths.

## Method Documentation

string displayName(type)

See also QStandardPaths::displayName().

url findExecutable(executableName, list<string> paths)

See also QStandardPaths::findExecutable().

url locate(type, string fileName, LocateOptions options = LocateFile)

See also QStandardPaths::locate().

list<url> locateAll(type, string fileName, LocateOptions options = LocateFile)

See also QStandardPaths::locateAll().

void setTestModeEnabled(testMode)

See also QStandardPaths::setTestModeEnabled().

list<url> standardLocations(type)

See also QStandardPaths::standardLocations().

url writableLocation(type)

See also QStandardPaths::writableLocation().