How To Download File With QT Service
-
Hi
Can you please show code and details on what you are doing. -
@mrjj
service constructor:
p = new QProcess(this);
p->start("C:/Users/from1/Desktop/QT_Downloader.exe");QT_Downloader constructor:
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); -
@mrjj
service constructor:
p = new QProcess(this);
p->start("C:/Users/from1/Desktop/QT_Downloader.exe");QT_Downloader constructor:
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);@Taz742
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 `?
This class
https://forum.qt.io/topic/5067/solved-qnetworkaccessmanager-downloads-won-t-start/9 -
@Taz742
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 `?
This class
https://forum.qt.io/topic/5067/solved-qnetworkaccessmanager-downloads-won-t-start/9 -
@mrjj
yes, it works but when downloader.exe is called from service, it doesn't download anything