fix savedialog path switch

This commit is contained in:
yangjianhao 2024-03-28 11:22:59 +08:00
parent 2e4571d8a9
commit 8bed507715
1 changed files with 1 additions and 2 deletions

View File

@ -24,11 +24,10 @@
#include "src/utils/filenamehandler.h"
MySaveDialog::MySaveDialog(QWidget *parent) :
QFileDialog(parent)
QFileDialog(parent, QString(), QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).at(0))
{
// setWindowIcon(QIcon::fromTheme("kylin-screenshot"));
setNameFilter(QLatin1String(" PNG(*.png);;BMP(*.bmp);;JPEG(*.jpg)"));
setDirectory(QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).at(0));
setAcceptMode(QFileDialog::AcceptSave);
setDefaultSuffix("png");
setLabelText(QFileDialog::Reject, tr("Cancel"));