Dialog::Dialog(QWidget *parent) : QDialog(parent), m_ui(new Ui::Dialog){ m_ui->setupUi(this);........ if (povt) { // в условие заходит и слот вызывает...... activon2(); }}void Dialog::activon2(){......... Dialog::close();}
C++ (Qt)QTimer::singleShot (0, this, SLOT (close ());