A native file open/save dialog. More...
| Import Statement: | import Shotcut.Controls |
| Value | Description |
|---|---|
FileDialog.OpenFile | Select an existing file to open (default) |
FileDialog.SaveFile | Choose a filename to save |
import Shotcut.Controls as Shotcut Shotcut.FileDialog { id: fileDialog title: qsTr("Open File") fileMode: Shotcut.FileDialog.OpenFile nameFilters: ["GPS files (*.gpx *.kml)", "All files (*)"] onFileSelected: myFile.url = file }
fileMode : int |
Whether the dialog is for opening or saving. One of FileDialog.OpenFile or FileDialog.SaveFile.
nameFilters : list<string> |
The list of file type filters shown in the dialog (e.g. ["Images (*.png *.jpg)", "All files (*)"] ).
selectedFile : string |
The full file path of the last selected file (read-only). Available after fileSelected is emitted.
title : string |
The dialog window title.
accepted() |
Emitted when the user confirms the dialog.
Note: The corresponding handler is onAccepted.
fileSelected(string file) |
Emitted when the user confirms a selection. file is the full path.
Note: The corresponding handler is onFileSelected.
rejected() |
Emitted when the user cancels or closes the dialog.
Note: The corresponding handler is onRejected.
open() |
Opens the native file dialog modally.