Since this is my first post... HI ALL!
Let me start by saying that I'm a uber nOOb at C++ after 20 years or so not using it, so I'm pretty much getting in touch with the basics...
As to my question:
I simply want to extract the IP from a network interface.
Qt Code:
QNetworkAddressEntry entry; qDebug() << ifObj;To copy to clipboard, switch view to plain text mode
Returns:
I want to get that first QHostAddress("192.168.3.246").QNetworkInterface(name = "eth1", hardware address = "00:13:CE:93:54:B6", flags = IsUp IsRunning CanBroadcast CanMulticast , entries = ((address = QHostAddress("192.168.3.246") , netmask = QHostAddress("255.255.255.0") , broadcast = QHostAddress("192.168.3.255") ) , (address = QHostAddress("FE80:0:0:0:213:CEFF:FE93:54B6") , netmask = QHostAddress("FFFF:FFFF:FFFF:FFFF:0:0:0:0") ) ) )
How can I achieve this? The functions/methods available don't *seem* to go my way...
Already thankful for any advice.
Best regards,
Pedro Doria Meunier
Bookmarks