diff options
Diffstat (limited to 'src/qcam')
-rw-r--r-- | src/qcam/main_window.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 29eaba84..ae1760df 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -17,6 +17,7 @@ #include <QImage> #include <QImageWriter> #include <QInputDialog> +#include <QStandardPaths> #include <QTimer> #include <QToolBar> #include <QToolButton> @@ -348,8 +349,9 @@ void MainWindow::stopCapture() void MainWindow::saveImageAs() { QImage image = viewfinder_->getCurrentImage(); + QString defaultPath = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); - QString filename = QFileDialog::getSaveFileName(this, "Save Image", "", + QString filename = QFileDialog::getSaveFileName(this, "Save Image", defaultPath, "Image Files (*.png *.jpg *.jpeg)"); std::cout << "Save image to " << filename.toStdString() << std::endl; |