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 the current SSID? What are QNetworkConfigurations?
Forum Update on Monday, May 27th 2025

How to get the current SSID? What are QNetworkConfigurations?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 1.5k Views
  • 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.
  • E Offline
    E Offline
    Eeli K
    wrote on last edited by
    #1

    Finally I would like to get the list of available SSIDs of available Wifi access points, like in the Windows panel wifi applet or the corresponding Linux wifi applet which let you select the wifi network (access point). Is it possible with Qt? I have come to the conclusion that it's not.

    But right now it would be enough to just get the name of the currently active WiFi connection in Windows 7 and especially in Android. Is even that possible? I have thought that the list of QNetworkConfigurations given by QNetworkAccessManager would do that. But I don't get any reasonable list. I have this code:

    void Connection::slotNetworksUpdated() {
        QNetworkAccessManager accMgr(nullptr);
        qDebug() << accMgr.activeConfiguration().name();
        QList<QNetworkConfiguration> confList = this->m_netMgr.allConfigurations();
        for (auto conf: confList){
            this->networksStringList << conf.name();
    
            qDebug() << conf.name() <<  conf.state() << conf.type() << conf.bearerType() << (conf == accMgr.activeConfiguration());
            QList<QNetworkConfiguration> childList{conf.children()};
            for (auto child: childList) {
                qDebug() << child.name();
            }
        }
    

    The list is quite much nonsense.

    Connection::slotNetworksUpdated 230: ""
    Connection::slotNetworksUpdated 235: "Lähiverkkoyhteys" QFlags(0x2) 0 1 false
    Connection::slotNetworksUpdated 235: "isatap.{C35FD744-57B2-46B6-B089-D07B4F408FE3}" QFlags(0x2) 0 0 false
    Connection::slotNetworksUpdated 235: "Teredo Tunneling Pseudo-Interface" QFlags(0x2) 0 0 false

    So, there's no active connection? And no wireless bearers at all? Even though the machine is connected to a wireless network even while typing this. Only "Lähiverkkoyhteys" is meaninful, the others are some technical garbage.

    Does this have something to do with the fact that the wireless connection is through a usb stick?

    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