I am creating a GUI where i have this particular slot.

Qt Code:
  1. void MainWindow2::on_pushButton_clicked()
  2. {
  3. QMessageBox::information(this, "Data Forwarded", ui->comboBox_2->currentText() +","+ ui->comboBox_5->currentText());
  4. }
To copy to clipboard, switch view to plain text mode 

Ideally it is supposed to just display the information message box,which it does, but somehow my mainwindow2 also closes. please suggest.