mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-11-07 04:52:15 +00:00
wip: qml components
This commit is contained in:
25
ui/qmls/Components/DirectorySelector.qml
Normal file
25
ui/qmls/Components/DirectorySelector.qml
Normal file
@ -0,0 +1,25 @@
|
||||
import QtQuick
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import internal.ui.utils
|
||||
|
||||
SelectorBase {
|
||||
id: base
|
||||
|
||||
FolderDialog {
|
||||
id: folderDialog
|
||||
selectedFolder: base.directoryUrl
|
||||
onAccepted: {
|
||||
base.directoryUrl = this.selectedFolder;
|
||||
this.currentFolder = this.selectedFolder;
|
||||
}
|
||||
}
|
||||
|
||||
property alias directoryUrl: base.url
|
||||
|
||||
shouldAcceptUrl: url => UrlUtils.isDir(url)
|
||||
onBrowseButtonClicked: {
|
||||
folderDialog.open();
|
||||
}
|
||||
placeholderText: '<font color="gray">Select a directory…</font>'
|
||||
}
|
||||
Reference in New Issue
Block a user