怎么跨类调用啊啊啊啊

This commit is contained in:
2022-01-03 02:25:26 +08:00
parent 773bffe63f
commit c9469227cf
26 changed files with 129 additions and 88 deletions
+9 -2
View File
@@ -2,6 +2,8 @@
#include "ui_widget.h"
#include <QDebug>
#include <QTcpSocket> //socket
#include "scan_run.h"
void Widget::tcp_connected()
{
@@ -143,7 +145,11 @@ void Widget::auto_edit()
//qDebug("%d",rand());
}
void Widget::test()
{
qDebug() << "Test";
Widget::tray_scan();
}
Widget::Widget(QWidget *parent)
: QWidget(parent)
@@ -152,8 +158,9 @@ Widget::Widget(QWidget *parent)
ui->setupUi(this);
//qDebug("hello world");
scan_run *scan_thread=new scan_run;
connect(ui->stard_scan,&QPushButton::pressed,this, &Widget::tray_scan);//'scan button pass'
connect(ui->stard_scan, &QPushButton::pressed, [=]() {scan_thread->start(); });//'scan button pass'
connect(ui->IP_list,&QTextEdit::textChanged,this, &Widget::auto_edit);