libbb/Application_autoExitChanged.cpp
This example illustrates how to connect to the Application manualExit signal in C++.
#include <bb/Application>
#include <QObject>
class TestObject: public QObject {
Q_OBJECT
public Q_SLOTS:
void onManualExit();
};
void TestObject::onAutoExitChanged(bool newAutoExitValue) {
// Handle event here.
}
int main(int argc, char **argv) {
bb::Application app(argc, argv);
TestObject testObject;
QObject::connect(&app, SIGNAL( autoExitChanged(bool) ), &testObject, SLOT( onAutoExitChanged(bool) ));
return app.exec();
}