[Development] Handling specific platform events in Qt

Tomasz Olszak olszak.tomasz at gmail.com
Fri Jun 28 23:52:26 CEST 2013

2013/6/28 Alan Alpert <416365416c at gmail.com>

> On Fri, Jun 28, 2013 at 3:23 AM, Friedemann Kleint
> <Friedemann.Kleint at digia.com> wrote:
> > Hi,
> >
> > QApplicationStateChangeEvent and enumeration Qt::ApplicationState are
> > intended for this purpose. Feel free to propose additional states if
> > they are not sufficient for your purposes.
> >
> > On the QPA side, they are triggered by
> > QWindowSystemInterface::handleApplicationStateChanged().
> >
> > I can't be sure whether this is accessible by QML, currently?
> This should be accessible via Qt.application.active (false if
> paused/minimized or otherwise not visible).
> --
> Alan Alpert
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

Alan you are right, from QML side Qt.application.active is just enough.
However I would like to ask for advice regarding where should I handle
I have some callback handler from which I could create and send
QApplicationStateChangeEvent. Additionally when I receive RESUME event then
top level window should be raised(It goes background when e.g. hardware
button is clicked).

So question are:
1. Where should I put the code which will handle receiving events from
Tizen and propagate them to Qt?
2. Where should I put code which will handle RESUME (in our case not
Qt::ApplicationSuspended) event:

QWindow *w = qGuiApp->topLevelWindows().at(0);

if (w) {





In the first case I thought about QXcbIntegration, in the second:

   1. QXcbIntegration (add hooks to xcb integration) - Tizen uses xcb
   platform plugin.
   2. QQmlApplicationEngine
   3. QXcbWindow

Thanks in advance


regards / pozdrawiam, Tomasz Olszak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130628/9a19fcdf/attachment.html>

More information about the Development mailing list