信号与槽机制
connect
// 方法1
connect(ui->pushButton_name, SIGNAL(Clicked(bool)),
this, SLOT(onBtnClicked(bool)));
// 方法2
connect(ui->pushButton_name, &QPushButton::clicked, this, &SetupDlg::onBtnClicked);
带参数 + 引用对象实例的槽函数(可先对对象实例进行操作)
ImagePreviewWidget *imgwidget = new ImagePreviewWidget();
imgwidget->SetBackgroundImage();
connect(this,SIGNAL(SnapshotZoomOut(int)),imgwidget,SLOT(show_min(int)));
emit
https://www.cnblogs.com/schips/p/12537360.html