StandardPaths QML Type

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

导入语句: import Qt.labs.platform 1.0
Since: Qt 5.8
继承:

QtObject

方法

详细描述

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

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

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

另请参阅 FileDialog , FolderDialog ,和 QStandardPaths .

方法文档编制

string displayName ( StandardLocation type )

另请参阅 QStandardPaths::displayName() .


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

另请参阅 QStandardPaths::findExecutable() .


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

另请参阅 QStandardPaths::locate() .


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

另请参阅 QStandardPaths::locateAll() .


void setTestModeEnabled ( bool testMode )

另请参阅 QStandardPaths::setTestModeEnabled() .


list < url > standardLocations ( StandardLocation type )

另请参阅 QStandardPaths::standardLocations() .


url writableLocation ( StandardLocation type )

另请参阅 QStandardPaths::writableLocation() .