Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get current network access state?
Forum Updated to NodeBB v4.3 + New Features

How to get current network access state?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Landy
    wrote on last edited by
    #1

    Hi guys,
    is there any good solution to get current network accessible state?
    I know that QNetworkAccessManager::networkAccessible() can do this, but, it didn't work. I tried many times, it always return UnknowNetworkAccessible.
    I googled it, but there is no good answer for it.
    Do u guys have any good idea?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Start your search with looking at [[doc:QNetworkConfigurationManager]]. I think it will set you on the right track.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Landy
        wrote on last edited by
        #3

        Hi Andre,
        I know that class. Maybe u wanted to say that i can get the network access state via QNetworkConfigurationManager::isOnline(), but actually, i tried this method, and it always returns true when i disable network adapter or enable it.
        What i want is whether Internet is accessed, unfortunately, it seems that QNetworkConfigurationManager can not work on it.
        [quote author="Andre" date="1347012772"]Start your search with looking at [[doc:QNetworkConfigurationManager]]. I think it will set you on the right track.[/quote]

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved