Qt 代码包 https://download.youkuaiyun.com/download/nn_84/88830445
dialog.h :
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <mythread.h>
QT_BEGIN_NAMESPACE
namespace Ui {
class Dialog;
}
QT_END_NAMESPACE
class Dialog : public QDialog
{
Q_OBJECT
public:
Dialog(QWidget *parent = nullptr);
~Dialog();
mythread thread1;
mythread thread2;
mythread thread3;
mythread thread4;
mythread thread5;
private slots:
void on_pushButton_1_clicked();
void on_pushButton_clicked();
private:
Ui::Dialog *ui;
};
#endif // DIALOG_H
mythread.h :
#ifndef MYTHREAD_H
#define MYTHREAD_H
#include <QObject>
#include <QThread>
#include <QDebug>
#include <QUdpSocket>
#include <Q