[Qt-qml] Key event capturing
Ben Marinic
ben at combinationstudios.com
Thu Jul 29 11:13:21 CEST 2010
Thanks Aaron - that was the only place I didn't set the focus!
Ben
On 29 Jul 2010, at 08:10, <aaron.kennedy at nokia.com> wrote:
> Hi,
>
> On 29/07/10 6:44 AM, "ext Ben Marinic" <ben at combinationstudios.com>
> wrote:
>> I'm having an issue with Key events. The following works in my child
>> QML file if I debug it directly:
>>
>> Keys.onPressed: {
>> console.log(event.key)
>> }
>> But if the child QML file is loaded in by another QML file (using a
>> Loader) then the Key event doesn't seem to be captured (nothing
>> traces
>> out). I have tried various "focus: true/false" combinations in both
>> the parent and the child QMLs.
>
> The attached example demonstrates the use of focus inside a Loader.
>
>> Also while trying to debug I attempted to set a break point. Are
>> break points possible in QML? I can't set any in Qt Creator 2.1.0
>> and
>> the docs don't mention them for QML:
>> http://doc.trolltech.com/qtcreator-snapshot/creator-debugging-
>> qml.html
>
> Right now there is no support. Future versions of Creator will
> include
> better support for QML debugging.
>
> Cheers,
>
> Aaron
>
> <test.tar.gz>
Ben Marinic
Combination Studios Ltd
e. ben at combinationstudios.com
t. +44 (0)20 7193 2000
m. +44 (0)7813 147 159
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100729/059b302a/attachment.html
More information about the Qt-qml
mailing list