Sailfish Pickers
API DocumentationFolderPickerDialog QML Type
A folder picker dialog for selecting a directory path More...
Import Statement: | import Sailfish.Pickers 1.0 |
Properties
- path : string
- selectedPath : string
- title : string
Detailed Description
The path variable can be used to set the initial location for the folder selection
Here is an example usage:
import QtQuick 2.2 import Sailfish.Silica 1.0 import Sailfish.Pickers 1.0 ApplicationWindow { initialPage: Component { Page { id: page property string directoryPath SilicaFlickable { contentHeight: column.height + Theme.paddingLarge*2 anchors.fill: parent VerticalScrollDecorator {} Column { id: column width: parent.width PageHeader { title: "Folder picker example" } ValueButton { anchors.horizontalCenter: parent.horizontalCenter label: "Directory" value: directoryPath ? directoryPath : "None" onClicked: pageStack.push(folderPickerDialog) } } } Component { id: folderPickerDialog FolderPickerDialog { title: "Download to" onAccepted: directoryPath = selectedPath onRejected: directoryPath = "" } } } } }
See also MultiFilePickerDialog, MultiContentPickerDialog, MultiDocumentPickerDialog, MultiDownloadPickerDialog, MultiImagePickerDialog, MultiMusicPickerDialog, and MultiVideoPickerDialog.
Property Documentation
This property holds the initial path of the folder picker dialog
By default path is home directory.
This property holds the path of the selected directory.
Defaults to the standard path of the user's home directory.
This property holds the title of the dialog. Current selected folder is shown under the title
By default title is empty.