Why QHostAddress().toIPv4Address() is different from inet_addr()?
-
Hello.
On Windows, QHostAddress().toIPv4Address() returns IP representation that is a reverted representation inet_addr() returns. For example:
@QHostAddress( "192.168.0.1" ).toIPv4Address() != inet_add( "192.168.0.1" )@
Why is such difference? And what is a good way to get "native" IP address representation that i can pass to third-party libraries or API functions?