Qt IP Address 얻기 예제
Qt 2022. 12. 19. 09:02Qt App에서 IP Address를 얻기 위한 예제 소스
#include <QHostAddress>
#include <QNetworkInterface>
{
QList<QHostAddress> addr = QNetworkInterface::allAddresses();
foreach (QHostAddress a, addr) {
if(0 < a.toIPv4Address()) {
if(a.toString().contains("127.0.0.1") == false) {
qDebug() << a.toString();
}
}
}
}
'Qt' 카테고리의 다른 글
Qt 모니터(Screen) 해상도 얻기 예제 (0) | 2022.12.19 |
---|---|
Qt AdapterInfo (Windows) (0) | 2022.12.19 |
[펌] Qt QML Scope and Naming Resolution (0) | 2018.05.29 |
[펌] Qt QML Performance Considerations And Suggestions (0) | 2018.05.29 |
VMWare Workstation 14 with Untutu 14.04.4 & Qt 5.6.3 Install (0) | 2018.04.29 |