gui: indexer tab: Show filepicker dialog when corresponding button clicked
This commit is contained in:
부모
f67a37bc21
커밋
b137dec434
@ -12,6 +12,7 @@
|
|||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QtConcurrent/QtConcurrent>
|
#include <QtConcurrent/QtConcurrent>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QFileDialog>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "clicklabel.h"
|
#include "clicklabel.h"
|
||||||
@ -129,6 +130,21 @@ void MainWindow::connectSignals()
|
|||||||
{ ui->btnDeletePath->setEnabled(this->ui->lstPaths->selectedItems().count() > 0); });
|
{ ui->btnDeletePath->setEnabled(this->ui->lstPaths->selectedItems().count() > 0); });
|
||||||
|
|
||||||
connect(ui->btnDeletePath, &QPushButton::clicked, this, [&] { qDeleteAll(ui->lstPaths->selectedItems()); });
|
connect(ui->btnDeletePath, &QPushButton::clicked, this, [&] { qDeleteAll(ui->lstPaths->selectedItems()); });
|
||||||
|
connect(ui->btnChoosePath, &QPushButton::clicked, this,
|
||||||
|
[&]
|
||||||
|
{
|
||||||
|
QFileDialog dialog(nullptr);
|
||||||
|
dialog.setFileMode(QFileDialog::Directory);
|
||||||
|
dialog.setOptions(QFileDialog::ShowDirsOnly);
|
||||||
|
if(dialog.exec())
|
||||||
|
{
|
||||||
|
auto paths = dialog.selectedFiles();
|
||||||
|
if(paths.size() == 1)
|
||||||
|
{
|
||||||
|
ui->lstPaths->addItem(paths[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::spinPreviewPageValueChanged(int val)
|
void MainWindow::spinPreviewPageValueChanged(int val)
|
||||||
|
불러오는 중...
Reference in New Issue
Block a user