Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Find user-friendly name in Internet connection to Raspberry PI?



  • Hi all,
    I write a code to show connection network to raspberry PI, but result is not correct. code works good in Ubuntu 14.04 but in Window 7 and Raspberry PI do not show name connections. I used QNetworkConfiguration::name().

    QNetworkConfigurationManager ncm;
    netcfgList = ncm.allConfigurations();
    WiFisList.clear();

    for (auto &x : netcfgList)
    {
      qDebug() << x.name();
    

    // if (x.bearerType() == QNetworkConfiguration::BearerEthernet)
    // {
    // if(x.name() == "")
    // // WiFisList << "Unknown(Other Network)";
    // qDebug() <<"Unknown(Other Network)";
    // else

    // qDebug() << x.name(); //WiFisList << x.name();

    // // qDebug() << x.name();
    // }

    }   
    

    Result in Raspberry PI, How should I change these names to a user-friendly name?
    "eth0"
    "wlan0"


  • Lifetime Qt Champion

    Hi,

    Kind of names are you thinking about ?



  • @SGaist The name we give to Internet communications. For example, my wireless connections name.

    Capture-internet.PNG


Log in to reply