mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-15 13:53:19 -05:00
Add option to select folder
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user