This example illustrates how to connect to the Application manualExit signal in C++.
#include <bb/Application>
#include <QObject>

class TestObject: public QObject {
public Q_SLOTS:
    void onManualExit();

void TestObject::onManualExit() {
    // Handle exit explicitly.
    // Make sure to exit the application at the end.

int main(int argc, char **argv) {
    bb::Application app(argc, argv);
    TestObject testObject;

    // The manualExit signal will not be emitted unless auto exit flag set to false.

    QObject::connect(&app, SIGNAL( manualExit() ), &testObject, SLOT( onManualExit() ));

    return app.exec();


Last modified: 2015-07-24

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus