1 MainWindow *ptr = NULL; 2 3 ptr = (MainWindow*)parentWidget(); 4 5 connect(ptr, SIGNAL(param_result(bool)), this, SLOT(param_add(bool)));