Reputation: 533
If my program needs to generate some files how can I make it in a way that it asks the user where to create the files?
For example to ask the user for an input of the location.
Upvotes: 0
Views: 65
Reputation: 22157
You can use QFileDialog::getSaveFileName
.
From the docs:
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
"/home/jana/untitled.png",
tr("Images (*.png *.xpm *.jpg)"));
Upvotes: 3