QT自定义信号与槽
- 自定义信号与槽
- Qt多线程简单实现
- 多线程间变量传递
工程结构
主线程类:
//export_key.h
#ifndef EXPORT_KEY_H
#define EXPORT_KEY_H
#include "main_widget.h"
namespace Ui {
class export_key;
}
class texport_work;
class export_key : public QWidget
{
Q_OBJECT
public:
explicit export_key(QWidget *parent = 0);
~export_key();
public slots:
int send_cmd(int *len, uchar *pk);
private:
Ui::export_key *ui;
//工作线程对象指针,在类实现中new对象work_thread
texport_work *work_thread;
uchar cmd[1024];
uchar kek[16];
};
#endif // EXPORT_KEY_H