mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-22 18:17:25 -05:00
Add option to select folder
This commit is contained in:
parent
1be2764d7b
commit
034a5255a5
|
|
@ -43,8 +43,10 @@ void FileSelection::BrowseButtonClicked()
|
|||
QString path;
|
||||
if (_type == FileSelection::Type::WRITE) {
|
||||
path = QFileDialog::getSaveFileName(this, "", defaultPath);
|
||||
} else {
|
||||
} else if (_type == FileSelection::Type::READ) {
|
||||
path = QFileDialog::getOpenFileName(this, "", defaultPath);
|
||||
} else {
|
||||
path = QFileDialog::getExistingDirectory(this, "", defaultPath);
|
||||
}
|
||||
|
||||
if (path.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ public:
|
|||
enum class Type {
|
||||
READ,
|
||||
WRITE,
|
||||
FOLDER,
|
||||
};
|
||||
|
||||
FileSelection(FileSelection::Type type = FileSelection::Type::READ,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user