On 06/22/2011 11:57 AM, ext Tang, Shaofeng wrote:
Hello Petri, and all QML experts

We meet a problem to click the GestureArea via TDriver API( all of tap, 
long_tap, and hold don't work for GestureArea).
Could you give us some suggestion for it?

A lot of DeclarativeComponent are defined with GestureArea in the latest MeeGo 
QML applications to replace MouseArea.
For instance, in the main.qml of meego-ux-settings. the component is defined as 
below. The whole codes are available from 
https://meego.gitorious.org/meego-ux/meego-ux-settings/blobs/master/main.qml

                                         GestureArea {
                                                 //id: mouseArea
                                                 anchors.fill: parent

                                                 Tap {
                                                         id: tapArea
                                                         onFinished: {
                                                                 
translator.catalog = model.translation
                                                                 .......
                                                         }
                                                 }
                                         }

Looks this element reacts if you:
a) Send a Mouse event only: sut.set_event_type(:Mouse), or if you used the use_tap_screen to send an x event (which is turn transformed into a mouse event) b) Instead of a tap, to a tiny drag: app.QDeclarativeText( :text => 'Bluetooth' ).drag(:Left,1)

The reason b doesn't work is probably that it expects a touchbegin, touchmove and touchevent events, and TDriver doesn't send a move if it doesn't move.

Cheers,
Tatu

_______________________________________________
MeeGo-qa mailing list
[email protected]
http://lists.meego.com/listinfo/meego-qa

Reply via email to