On 07/31/2013 08:42 PM, Iain Lane wrote:
On Wed, Jul 31, 2013 at 03:18:27PM +0400, Alberto Mardegan wrote:
On 07/30/2013 07:50 PM, Iain Lane wrote:
Admittedly I didn't know about it ;-) But looking at that API reference
it seems to be more about mobile stuff whereas my question is a bit more
generic than that — I want to know if there's an internet connection of
any type available.
Maybe I can't see it on this API or maybe Qt has something else for that
in which case I'd be happy to switch over.
QNetworkAccessManager::networkAccessible():
https://qt-project.org/doc/qt-5.0/qtnetwork/qnetworkaccessmanager.html#networkAccessible-prop
Thanks for the tip. It looks like it should work, however I always get
QNetworkAccessManager::UnknownAccessibility returned. Is there a trick?
Qt uses QPA plugins to provide this information. On the desktop, I have
a NetworkManager plugin:
/usr/lib/x86_64-linux-gnu/qt5/plugins/bearer/libqnmbearer.so
I can't access my Ubuntu phone right now, but please check if you have a
libqnmbearer.so in the directory returned by "qmake -query
QT_INSTALL_PLUGINS".
Then you could check with "strace" if that plugin is ever loaded. If
not, I'm not sure what's to be done. You could try playing with the
QT_QPA_GENERIC_PLUGINS environment variable (I just found it searching
in the Qt source code), to see if you can force it loading.
Ciao,
Alberto
--
Mailing list: https://launchpad.net/~ubuntu-phone
Post to : ubuntu-phone@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help : https://help.launchpad.net/ListHelp