void MainWindow::FindLocalInterface()
{
ui->textEdit_2->append(( interface.humanReadableName()));
ui
->textEdit_2
->append
(( lookUpHost
( QHostInfo::fromName( QHostAddress( addressEntry.
ip() ).
toString() ) ) ));
ui
->textEdit_2
->append
(( QHostAddress( addressEntry.
ip() ).
toString() ));
ui->textEdit_2->append(( interface.hardwareAddress()));
ui
->textEdit_2
->append
(( QHostAddress( addressEntry.
broadcast() ).
toString()) );
ui
->textEdit_2
->append
(( QHostAddress( addressEntry.
netmask() ).
toString() ));
ui->textEdit_2->append("\n\n\n");
}
}
}
void MainWindow::FindLocalInterface()
{
foreach( QNetworkInterface interface, QNetworkInterface::allInterfaces() ){
foreach( QNetworkAddressEntry addressEntry, interface.addressEntries() ){
ui->textEdit_2->append(( interface.humanReadableName()));
ui->textEdit_2->append(( lookUpHost( QHostInfo::fromName( QHostAddress( addressEntry.ip() ).toString() ) ) ));
ui->textEdit_2->append(( QHostAddress( addressEntry.ip() ).toString() ));
ui->textEdit_2->append(( interface.hardwareAddress()));
ui->textEdit_2->append(( QHostAddress( addressEntry.broadcast() ).toString()) );
ui->textEdit_2->append(( QHostAddress( addressEntry.netmask() ).toString() ));
ui->textEdit_2->append("\n\n\n");
}
}
}
To copy to clipboard, switch view to plain text mode
Hi all, i have code like this. i want to see on a selectable item and select... i read treeview and table view manuals on my local but i cant find any good example and i need help. ):
Added after 1 48 minutes:
thanks for all...!
Bookmarks