Add QFileDialog::DontUseNativeDialog
This commit is contained in:
+17
-4
@@ -293,7 +293,10 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||
|
||||
void MainWindow::copyOrMove(bool copy)
|
||||
{
|
||||
QString dest = QFileDialog::getExistingDirectory(this, tr("Select destination"), _lastDir);
|
||||
QString dest = QFileDialog::getExistingDirectory(this,
|
||||
tr("Select destination"),
|
||||
_lastDir,
|
||||
QFileDialog::ShowDirsOnly | QFileDialog::DontUseNativeDialog);
|
||||
copyOrMove(copy, dest);
|
||||
}
|
||||
|
||||
@@ -366,7 +369,12 @@ void MainWindow::pixmapLoaded(Image *image)
|
||||
|
||||
void MainWindow::loadFile()
|
||||
{
|
||||
QString file = QFileDialog::getOpenFileName(this, tr("Open file"), _lastDir, tr("Images (*.jpg *.jpeg *.png *.cr2 *.nef *.dng *.fit *.fits *.xisf *.JPG *.JPEG *.PNG *.CR2 *.NEF *.DNG *.FIT *.FITS *.XISF)"));
|
||||
QString file = QFileDialog::getOpenFileName(this,
|
||||
tr("Open file"),
|
||||
_lastDir,
|
||||
tr("Images (*.jpg *.jpeg *.png *.cr2 *.nef *.dng *.fit *.fits *.xisf *.JPG *.JPEG *.PNG *.CR2 *.NEF *.DNG *.FIT *.FITS *.XISF)"),
|
||||
nullptr,
|
||||
QFileDialog::DontUseNativeDialog);
|
||||
loadFile(file);
|
||||
}
|
||||
|
||||
@@ -393,7 +401,7 @@ void MainWindow::loadFile(int row)
|
||||
|
||||
void MainWindow::indexDir()
|
||||
{
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Index directory"), _lastDir);
|
||||
QString dir = QFileDialog::getExistingDirectory(this, tr("Index directory"), _lastDir, QFileDialog::ShowDirsOnly | QFileDialog::DontUseNativeDialog);
|
||||
indexDir(dir);
|
||||
}
|
||||
|
||||
@@ -417,7 +425,12 @@ void MainWindow::reindex()
|
||||
void MainWindow::saveAs()
|
||||
{
|
||||
QString selectedFilter;
|
||||
QString file = QFileDialog::getSaveFileName(this, tr("Save as"), _lastDir, tr("JPEG (*.jpg *.JPG);; PNG (*.png *.PNG);;FITS (*.fits *.FITS);;XISF (*.xisf *.XISF)"), &selectedFilter);
|
||||
QString file = QFileDialog::getSaveFileName(this,
|
||||
tr("Save as"),
|
||||
_lastDir,
|
||||
tr("JPEG (*.jpg *.JPG);; PNG (*.png *.PNG);;FITS (*.fits *.FITS);;XISF (*.xisf *.XISF)"),
|
||||
&selectedFilter,
|
||||
QFileDialog::DontUseNativeDialog);
|
||||
if(!file.isEmpty())
|
||||
{
|
||||
QFileInfo info(file);
|
||||
|
||||
Reference in New Issue
Block a user