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. QNetworkInterface getting a name that means something?
Forum Updated to NodeBB v4.3 + New Features

QNetworkInterface getting a name that means something?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 309 Views 2 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by SPlatten
    #1

    When the application is started I test for a switch /listNI, if this is present I iterate through the network adapters on the system and display the interface name:

                        for( const QNetworkInterface& interface : QNetworkInterface::allInterfaces() )
                        {
                            const QString cstrName(interface.name());
                            if ( cstrName.startsWith(SckServer::mscszLoopback) != true )
                            {
                                qinf() << "\t" << interface.name();
                            }
                        }
    

    The output from this is:

    Network interfaces:
    ethernet_32771
    ethernet_32769
    ethernet_32772
    wireless_32769
    wireless_32770
    wireless_32768
    

    Looking in Device Manager and at the Network adapters, none of these are found. Is there anything that displayed that can be cross referenced with the output from ipconfig /all?

    Edit, Fixed, replaced .name() with .humanReadableName()

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      mark as solved?

      I light my way forward with the fires of all the bridges I've burned behind me.

      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