QT窗口传值问题急需解答!谢
我在一个A dialog里调用另一个B dialog(即A中写B *b=new B)然后想将A中的一个值传给B。
A叫dialog2true.cpp B叫dialog2.cpp
在哪写connect呢?我在B里写connect(this->parent(), SIGNAL(send(QString)), this, SLOT(receive(QString)));
报错QObject::connect: Cannot connect (null)::send(QString) to Dialog2::receive(QString)
但是因为B并没有继承A所以不行啊
在Dialog2 *a=new Dialog2;下面写connect(a, SIGNAL(send(QString)), this, SLOT(receive(QString)));
这样就把传的主次弄反了啊?
该咋整啊??
QT菜鸟望各位大神解答