How to save an existing file from another path to my desktop?
-
Hi Guys.
I am new in the community, my problem is when building a pushbotton on my interface called "Download Template" his main fuction is gives to the user an existing document to their desktop or in case the user select the path where shall save it. I used the class getSaveFileName to open a pop up selecting where save the existing file but I don't know where could begin. CLICK HERE
-
Hi and welcome to devnet,
Your question is not exactly clear.
At what point are you currently ?
What do you mean by "I don't know where could begin" ? -
@SGaist Hi friend I just want to save an existing file in another path through a button where an pop up show and you could tell where save it. Here are an little example of my code, it should help you.
void DataSheetEdit::on_saveDatasheetButton_clicked() { QString Path = "/path/here"; QFileDialog::getSaveFileName(this, "Where you want to save the template", Path , tr("Documents (*.docx *.doc *.odt)")); }
-
https://stackoverflow.com/questions/39169530/qt-how-to-copy-file-with-qfilecopy-using-qfiledialog
There are much more results with a simple google search "qt copy file"