Witam. Próbowałem skopiować plik taką instrukcją:
QFile::copy(path, "Folder/" + fileName);
Ale nie działa. Co jest źle?
Witam. Próbowałem skopiować plik taką instrukcją:
QFile::copy(path, "Folder/" + fileName);
Ale nie działa. Co jest źle?
#include <iostream>
#include <QFile>
#include <QDir>
int main()
{
QString currentPath = QDir::current().absolutePath();
bool success = QFile::copy("abc.txt", currentPath + "/newFolder/cba.txt");
std::cout << success;
return 0;
}
upewnij się, że utworzyłeś newFolder