[Qt-interest] New Bee Question: Quiting under following situation
John McClurkin
jwm at nei.nih.gov
Tue Jun 9 18:52:26 CEST 2009
Rahulkumar Tibdewal wrote:
> Hi All,
>
>
>
> I want to quit a application from the following code.
>
>
>
> QMessageBox::StandardButton reply;
>
> reply = QMessageBox::information(this, tr(“xyz”),tr(“xyz”));
You are using one of the static QMessageBox functions. I don't think you
can get a reference to the buttons in these static dialogs.
>
> if(reply == QMessageBox::Ok)
>
> {
>
> //Some to be done here to close the application.
Just call qApp->quit() at this point.
>
> }
>
>
>
> In the code above, I am having a problem in getting reference of OKButton.
>
> So I was not able to quit application by using connect (okButton,
> SIGNAL(clicked), qApp, SLOT(quit()));
>
More information about the Qt-interest-old
mailing list