Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Network selection popup
Qt 6.11 is out! See what's new in the release blog

Network selection popup

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.0k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    hello
    i want 2 ask how i could give user choice 2 connect 2 network through popup of available connection?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Look at QNetworkSession and its related classes.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        i tried this
        @
        QNetworkConfigurationManager manager;
        const bool selectIap = (manager.capabilities()& QNetworkConfigurationManager::CanStartAndStopInterfaces);
        QNetworkConfiguration defaultIap = manager.defaultConfiguration();
        if(!defaultIap.isValid() || !selectIap )
        {
        // let the user know that there is no access point available
        QMessageBox::information(this,"Bearer","Available Access Points not found");
        return;
        }

        QNetworkSession *session = new QNetworkSession(defaultIap,this);
        session->open();
        session->waitForOpened();
        QNetworkInterface iff = session->interface();
        QMessageBox::information(this,"Network opened",iff.humanReadableName());@
        put when i close ethernet connection to test this on simulator i got MessageBox "Available Access Points not found"
        i want 2 give me popup 2 connect 2 internet what can i do?

        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