MainWindow closes while going through a particular slot.
I am creating a GUI where i have this particular slot.
Code:
void MainWindow2::on_pushButton_clicked()
{
QMessageBox::information(this,
"Data Forwarded", ui
->comboBox_2
->currentText
() +","+ ui
->comboBox_5
->currentText
());
}
Ideally it is supposed to just display the information message box,which it does, but somehow my mainwindow2 also closes. please suggest.
Re: MainWindow closes while going through a particular slot.
make sure ui->comboBox_2, and ui->comboBox_5 are valid pointer