NetworkedOpenGL/mainwindow.cpp
foreach(const QHostAddress& address, QNetworkInterface::allAddresses()) {
		if (address.protocol() == QAbstractSocket::IPv4Protocol &&
				address != QHostAddress(QHostAddress::LocalHost) &&
				address.toString().section(".", -1, -1 ) != "1") {

			m_ipAddress = address.toString();
		}
	}
// Get local IP Address and display it in status bar and window title.
Get local IP Address and display it in status bar and window title.
Get local IP Address and display it in status bar and window title .
foreach(const QHostAddress& address, QNetworkInterface::allAddresses()) {
		if (address.protocol() == QAbstractSocket::IPv4Protocol &&
				address != QHostAddress(QHostAddress::LocalHost) &&
				address.toString().section(".", -1, -1 ) != "1") {
			m_ipAddress = address.toString();
		}
	}
foreach ( const QHostAddress & address , QNetworkInterface :: allAddresses ( ) ) { if ( address . protocol ( ) == QAbstractSocket :: IPv4Protocol && address != QHostAddress ( QHostAddress :: LocalHost ) && address . toString ( ) . section ( " " , -1 , -1 ) != " " ) { m_ipAddress = address . toString ( ) ; } }
Get local IP Address and display it in status bar and window title.
Get local IP Address and display it in status bar and window title .