PDA

View Full Version : Can't retrieve QNetworkinterface using interfaceFromName method



steniels
15th June 2010, 14:17
Hey,

I'm want to retrieve a interface by name. Using this code, I'm 100% sure that the interface exists, I used QNetworkInterface::allInterfaces() to check all the available interfaces. Still It can't find the right interface with the interfaceFromName method.
Any body an idea how to solve this ?
I'm running Qt 4.6 on Mac OS X.



try
{
iterface = QNetworkInterface::interfaceFromName("en0");
}
catch(exception)
{
return false;
}

if(!iterface.isValid())
return false;