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. Internet: what type of connection?
Forum Updated to NodeBB v4.3 + New Features

Internet: what type of connection?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.6k 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.
  • S Offline
    S Offline
    spode
    wrote on last edited by
    #1

    How to get to know if the user is connected to internet?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      You try to connect to some server on the internet. If that works, then the user is connected.

      You can also query the OS whether the computer is connected to the network, but that kind of access does not guarantee that you can talk to the internet (or the server you care about).

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tucnak
        wrote on last edited by
        #3

        I am agree with ~Tobias. If you want to check internet access it will be the best solution to try to load light-weight page. If reply does not have any errors - internet connection is OK.

        It's very simple to do with QNetworkAccessManager.

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

          Seems to me that this is what [[doc:QNetworkSession]] and [[doc:QNetworkConfiguration]] are meant for?

          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