[Qt-qml] Key event capturing

aaron.kennedy at nokia.com aaron.kennedy at nokia.com
Thu Jul 29 09:10:40 CEST 2010


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.gz
Type: application/octet-stream
Size: 384 bytes
Desc: test.tar.gz
Url : http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100729/1e6d63bf/attachment.obj 


More information about the Qt-qml mailing list