How To Download File With QT Service
I wrote service, when this service is running in every 15 seconds it calls one exe file from desktop and one file must be downloaded with this exe file but it doesn't download anything
Can you please show code and details on what you are doing.
p = new QProcess(this);
QString filename = "https://sourceforge.net/p/qtlmovie/code/ci/v1.2.16/tree/build/windows-build-qt-static.ps1?format=raw";
QUrl url1 = QUrl::fromUserInput(filename);
m_downloader = new SimpleDownloader(url1, QDir(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)), true, this);
Did you hook up the QProcess error signals so u can see if something is up ?
also for the SimpleDownloader. Its important to see if any errors is reported.
Also if you run this manually in a shell/cmd.exe
Does it then work ?
ps what is SimpleDownloader `?
yes, it works but when downloader.exe is called from service, it doesn't download anything
because I think that this service doesn't have network access
Your code doesn't do any error handling so like @mrjj suggested: connect all error related signals to see what is happening and add proper checks.