- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
QHostAddress DBConnect::getIP()
{
if(_clientAddress.isNull())
{
QList <QHostAddress > addressList = QNetworkInterface::allAddresses();
for(int i = 0; i < addressList.size(); ++i)
{
if(addressList.at(i).toString().mid(0,3) == "192")
{
_clientAddress = addressList.at(i);
break;
}
}
};
return _clientAddress;
}