[Qt-qml] Key event capturing

Ben Marinic ben at combinationstudios.com
Thu Jul 29 11:14:30 CEST 2010


Thanks for the heads up Gregory.  I think I'll just log for now rather  
than doing a build of Creator.

Ben

On 29 Jul 2010, at 08:35, Gregory Schlomoff wrote:

>>> Also while trying to debug I attempted to set a break point.  Are
>>> break points possible in QML?
>
> There is some early support for breakpoints and debugging javascript
> in QML with the latest version of Qt Creator, but it's still
> experimental, and it works only for pure qml apps (you can't debug QML
> code inside a C++ app)
>
> If you want to give it a try, you just have to clone the qt-creator
> repository and build it.
>
> greg
>
> On Thu, Jul 29, 2010 at 2:10 PM,  <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
>>
>>
>> _______________________________________________
>> Qt-qml mailing list
>> Qt-qml at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-qml
>>
>>

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/c8ce749b/attachment.html 


More information about the Qt-qml mailing list