libbb/Application_pooling.cpp

This example illustrates how to connect to the Application pooling(const QString &) signal in C++.
#include <bb/Application>
#include <QObject>

class TestObject: public QObject {
Q_OBJECT
public Q_SLOTS:
    void onPooling( const QString &poolRequestID );
};

void TestObject::onPooling( const QString &poolRequestID ) {
    // Do something here

    // Ensure you call the bb::Application::poolingComplete() method with the poolRequestID value.
}

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

    QObject::connect(&app, SIGNAL( pooling(const QString &) ), &testObject, SLOT( onPooling(const QString &) ));

    return app.exec();
}

Overview

Last modified: 2014-03-13

comments powered by Disqus