StandardPaths QML Type

Provides access to the standard system paths. 更多...

Import Statement: import Qt.labs.platform 1.0
开始支持版本: Qt 5.8
基类:

QtObject

方法

详细描述

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.

参见 FileDialog, FolderDialog, and QStandardPaths.

成员

string displayName(StandardLocation type)


url findExecutable(string executableName, list<string> paths)


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


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


void setTestModeEnabled(bool testMode)


list<url> standardLocations(StandardLocation type)


url writableLocation(StandardLocation type)