...or use the static QFileDialog::getSaveFileName() and check if empty.