I'm trying to make a program which will install itself once run. I have everything done except copying a file from the exe's resources path to somewhere on the hard drive. This is the code I use:
Qt Code:
  1. QFile file
  2. QDir::setCurrent(":/resource");
  3. file.setFileName("lim.jar");
  4. QDir dir;
  5. dir.mkdir(pathLineEdit->text());
  6. if(!file.copy(pathLineEdit->text()+"lim.jar")){
  7. pathLineEdit->setText("could not write");
  8. return;
  9. }
To copy to clipboard, switch view to plain text mode