SecondDlg *seconddlg = new SecondDlg;seconddlg->show();firstDlg->hide();
firstDlg->show();
SecondDlg *seconddlg = new SecondDlg;connect(seconddlg, SIGNAL(buttonPressed()), this, SLOT(mySlot()));seconddlg->show();firstDlg->hide();
connect(myButton, SIGNAL(clicked()), this, SIGNAL(buttonPressed()));