CodeLibrary/05_QtCreator_Cplus_TCPServer_20240423/thread.h

32 lines
424 B
C
Raw Permalink Normal View History

#ifndef THREAD_H
#define THREAD_H
#include <QObject>
#include <QThread>
#include <QTcpSocket>
class Thread : public QObject
{
Q_OBJECT
public:
explicit Thread(QTcpSocket *s);
void myTimeout();
void setFlag(bool flag);
signals:
void sendToWidget(QByteArray b);
void mySignal();
public slots:
void clientInfoSlots();
private:
QTcpSocket *socket;
bool isStop;
};
#endif // THREAD_H