Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QCoreApplication::quit (  )  [static, slot]

Tells the application to exit with return code 0 (success). Equivalent to calling QCoreApplication::exit(0).

It's common to connect the QApplication::lastWindowClosed() signal to quit(), and you also often connect e.g. QAbstractButton::clicked() or signals in QAction, QMenu, or QMenuBar to it.


        QPushButton *quitButton = new QPushButton("Quit");
        connect(quitButton, SIGNAL(clicked()), &app, SLOT(quit()));

See also:
exit(), aboutToQuit(), QApplication::lastWindowClosed()

Definition at line 1339 of file qcoreapplication.cpp.

References exit().

Referenced by event().


Generated by  Doxygen 1.6.0   Back to index