[Interest] QML Window handling focus events

Daiwei Li daiweili at gmail.com
Tue May 21 04:23:40 CEST 2013


Thanks for the quick response, Alan! appliaction.active works for me for
now, but I'm looking forward to onActiveChanged being added to Qt 5.1.

Daiwei


On Mon, May 20, 2013 at 6:57 PM, Alan Alpert <416365416c at gmail.com> wrote:

> On Mon, May 20, 2013 at 5:56 PM, Daiwei Li <daiweili at gmail.com> wrote:
> > It looks the QQuickWindow C++ class has focusIn and focusOut event
> handlers
> > that you can override, but there's no signal in QML. Am I missing
> something
> > or is it intentionally left out of QML?
>
> The QML API for QQuickWindow is still young (and growing slowly), but
> that signal is being added in Qt 5.1 (onActiveChanged). In Qt 5.0,
> there is an application.active property you can listen to in QML to
> see if the application as a whole is active, but it's not granular to
> individual windows.
>
> There's no distinction between window focusIn/Out and window
> active/inactive. Leaving that out is intentional, because it's rarely
> an important distinction (and when it is, you have the C++ API).
>
> --
> Alan Alpert
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130520/3bb61d21/attachment.html>


More information about the Interest mailing list