How to find which network interface is up in Qt

  • Suppose i have two network cards one for lan and other for wlan, How can i find the name of card which is connected to internet. like eth0 or eth1.
    @ QNetworkInterface netInterface;
    interface =;@

    How to initialize netInterface, so that it returns the correct name

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.