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 show WiFi connections?
Qt 6.11 is out! See what's new in the release blog

How to show WiFi connections?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 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.
  • S Offline
    S Offline
    Saeed_Nowroozi
    wrote on last edited by
    #1

    Hi,
    How can I access the connections connected to my computer? I want to show them in QML and select one to connect to the internet. Does Qt have a library for this?
    network.PNG

    1 Reply Last reply
    0
    • jsulmJ jsulm

      @Saeed_Nowroozi said in How to show WiFi connections?:

      I want to use in Raspberry Pi

      Do so. Works same way there.

      S Offline
      S Offline
      Saeed_Nowroozi
      wrote on last edited by
      #5

      @jsulm I finally use a this code. Program in Windows and Raspberry PI do not show any things but in Ubuntu work!
      http://www.mediafire.com/file/7jrm90s1vsrs5m2/WiFi.rar/file

      1 Reply Last reply
      0
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by mzimmers
        #2

        You'll use the QNetworkInterface class to obtain a list of your network interfaces. Then iterate through the list, looking for those entries with QNetworkInterface::Wifi.

        Depending on your specific hardware, this may not work absolutely 100% of the time, but I found it pretty reliable for my applications.

        EDIT: this is of course a C++ solution, but it should be straightforward to expose them to QML.

        S 1 Reply Last reply
        2
        • mzimmersM mzimmers

          You'll use the QNetworkInterface class to obtain a list of your network interfaces. Then iterate through the list, looking for those entries with QNetworkInterface::Wifi.

          Depending on your specific hardware, this may not work absolutely 100% of the time, but I found it pretty reliable for my applications.

          EDIT: this is of course a C++ solution, but it should be straightforward to expose them to QML.

          S Offline
          S Offline
          Saeed_Nowroozi
          wrote on last edited by
          #3

          @mzimmers Thank you, I want to use in Raspberry Pi.

          jsulmJ 1 Reply Last reply
          0
          • S Saeed_Nowroozi

            @mzimmers Thank you, I want to use in Raspberry Pi.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #4

            @Saeed_Nowroozi said in How to show WiFi connections?:

            I want to use in Raspberry Pi

            Do so. Works same way there.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Saeed_Nowroozi said in How to show WiFi connections?:

              I want to use in Raspberry Pi

              Do so. Works same way there.

              S Offline
              S Offline
              Saeed_Nowroozi
              wrote on last edited by
              #5

              @jsulm I finally use a this code. Program in Windows and Raspberry PI do not show any things but in Ubuntu work!
              http://www.mediafire.com/file/7jrm90s1vsrs5m2/WiFi.rar/file

              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