How intercept background and foreground event
-
bq. QEvent::ApplicationActivate The application has been made available to the user.
QEvent::ApplicationDeactivate The application has been suspended, and is unavailable to the user.bq. "QEvent":http://doc.qt.nokia.com/latest/qevent.html QObjects receive events by having their QObject::event() function called. The function can be reimplemented in subclasses to customize event handling and add additional event types; QWidget::event() is a notable example. By default, events are dispatched to event handlers like QObject::timerEvent() and QWidget::mouseMoveEvent(). QObject::installEventFilter() allows an object to intercept events destined for another object.
Forward these events to QML using signals.