I try to create "Save as..." dialog in Ubuntu. But I want to use it just for save as a file is there any way to pass file and its path to this dialog? this is my code:
int main(int agc,char **argv){
QApplication app(argc,argv);
QFileDialog my;
my.getSaveFileName(0."Save file ",QDir::currentPath,"Music files(*.mp3;;Text files (*.txt)"));
my.selectFile("myfile.txt");
return 0;
}
You should pass the file name and its path in the second argument.
Example: