求助!!!Qt界面相互通信
做了两个界面,主界面为spray,子界面为setdialog,想实现如下功能,在子界面的输入框里输入一个参数,然后在主界面显示,下面是主要的代码,各位大侠看看错误在哪子程序相关函数SetDialog::SetDialog(QWidget *parent) :…………connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(twotest1()));……void SetDialog::twotest1(){ emit t(); this->hide();}主程序相关函数Spray::Spray(QWidget *parent) :……connect(ui->setpushButton,SIGNAL(clicked()),this,SLOT(test1()));connect(&setdialog,SIGNAL(t()),this,SLOT(test3()));……void Spray::test1(){ setdialog.show(); this->hide();}void Spray::test3(){ this->show(); value = &setdialog->lineEdit->text(); }Value是主程序里面的值