Created
April 16, 2018 14:42
-
-
Save estan/f3e43f647a112d64c9f17a8bad9a094a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QApplication> | |
#include <QFileDialog> | |
int main(int argc, char *argv[]) { | |
QApplication app(argc, argv); | |
QFileDialog dialog(0, "Test Dialog"); | |
dialog.setConfirmOverwrite(true); | |
dialog.setAcceptMode(QFileDialog::AcceptSave); | |
// As soon as I uncomment this, to use the Qt build-in dialog, | |
// the confirmation dialog is shown when picking an existing file. | |
//dialog.setOption(QFileDialog::DontUseNativeDialog); | |
dialog.exec(); | |
return app.exec(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment