View Full Version : QNetworkAccessManager property question
waynew
30th November 2010, 01:03
How does one access this property to find out if the network is available?
networkAccessible : NetworkAccessibility
This property holds whether the network is currently accessible via this network access manager.
BalaQT
30th November 2010, 04:58
hi,
did u check the doc,
enum QNetworkAccessManager::NetworkAccessibility
Indicates whether the network is accessible via this network access manager.
Constant Value Description
QNetworkAccessManager::UnknownAccessibility -1 The network accessibility cannot be determined.
QNetworkAccessManager::NotAccessible 0 The network is not currently accessible, either because there is currently no network coverage or network access has been explicitly disabled by a call to setNetworkAccessible().
QNetworkAccessManager::Accessible 1 The network is accessible.
hope it helps
Bala
waynew
1st December 2010, 01:21
Thanks Bala, yes, I checked the doc. My question was what syntax to use to get the value of the property.
BalaQT
1st December 2010, 11:01
hi,
im not sure this will help or not , but pls look this file,
qnetworkaccessmanager.cpp line no : 1337
if (networkAccessible == QNetworkAccessManager::NotAccessible)
emit q->networkAccessibleChanged(QNetworkAccessManager::No tAccessible);
else
emit q->networkAccessibleChanged(QNetworkAccessManager::Un knownAccessibility);
return;
hope it helps
Bala
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.