Qt5之旅开启了.
本内容仅作为学习记录。一点一点的积累,每一个小项目都是将来大神的必备,为自己加油!
networkinformation.h
#ifndef NETWORKINFORMATION_H
#define NETWORKINFORMATION_H
#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QGridLayout>
#include <QMessageBox>
#include <QHostInfo>
#include <QNetworkInterface>
namespace Ui {
class NetworkInformation;
}
class NetworkInformation : public QWidget
{
Q_OBJECT
public:
explicit NetworkInformation(QWidget *parent = 0);
void getHostInformation();
~NetworkInformation();
private:
Ui::NetworkInformation *ui;
QLabel *hostLabel;
QLineEdit *LineEditLocalHostName;
QLabel *ipLabel;
QLineEdit *LineEditAddress;
QPushButton *detailBtn;
QGridLayout *mainLayout;
public slots:
void slotDetail();
};
#endif // NETWORKINFORMATION_H
<