Advertisement
WolfeZ

Save file

Jun 5th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /! [9]
  2. bool MainWindow::save()
  3. //! [9] //! [10]
  4. {
  5.     if (curFile.isEmpty()) {
  6.         return saveAs();
  7.     } else {
  8.         return saveFile(curFile);
  9.     }
  10. }
  11. //! [10]
  12.  
  13. //! [11]
  14. bool MainWindow::saveAs()
  15. //! [11] //! [12]
  16. {
  17.     QString fileName = QFileDialog::getSaveFileName(this);
  18.     if (fileName.isEmpty())
  19.         return false;
  20.  
  21.     return saveFile(fileName);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement