PDA

View Full Version : MainWindow closes while going through a particular slot.



alok9871
20th December 2012, 07:37
I am creating a GUI where i have this particular slot.


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.

Santosh Reddy
20th December 2012, 07:59
make sure ui->comboBox_2, and ui->comboBox_5 are valid pointer