The Following User Says Thank You to marmistrz For This Useful Post: | ||
![]() |
2012-07-27
, 21:39
|
Posts: 1,067 |
Thanked: 2,383 times |
Joined on Jan 2012
@ Finland
|
#2
|
QNetworkConfigurationManager manager; QNetworkConfiguration cfg = manager.defaultConfiguration(); QNetworkSession* session = new QNetworkSession(cfg); session->setSessionProperty("ConnectInBackground", true); session->open();
The Following User Says Thank You to rainisto For This Useful Post: | ||
![]() |
2012-08-08
, 15:10
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#3
|
For example add following to your main.cpp, it doesn't even ask for popup if user has allowed background connections:
Code:QNetworkConfigurationManager manager; QNetworkConfiguration cfg = manager.defaultConfiguration(); QNetworkSession* session = new QNetworkSession(cfg); session->setSessionProperty("ConnectInBackground", true); session->open();
I'm working on an app which downloads content from internet. I'm using libcurl for downloading file.
How can I display popup to ask for internet connection and wait with download until internet connection is available?
Thanks in advance
If you want to support my work, you can donate by PayPal or Flattr
Projects no longer actively developed: here