June 10, 2011

sfjam sfjam
Lab Rat
41 posts

about a signal which will be handled in TextEdit area

 

if one mousArea is a child of another mousArea,whether the first mousArea’s singal does not work?

15 replies

June 10, 2011

dialingo dialingo
Lab Rat
158 posts

Not sure what your question is. Could you please add some lines of code to make it clearer?

June 12, 2011

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

Child or overlapping first MouseArea? If you mean overlapping then please use Search. It was dicussed in couple of threads some time ago

June 13, 2011

sfjam sfjam
Lab Rat
41 posts

in my code ,i difined a mousearea in TextEdit,the mousearea handle a click singal,but after the singal be handled,i can’t input to the TextEdit area

June 13, 2011

jim_kaiser jim_kaiser
Lab Rat
144 posts

You’re working in QML? I only see a mouse area in QML. It sounds to me like, you are eating the event in your handler. Maybe, you should handle it and pass it on to the parent. You could do that with an

  1. event->ignore();

June 14, 2011

sfjam sfjam
Lab Rat
41 posts

in my codes,i defined a onClicked:{}in TextEdit,after the singal is handled ,how to cancel it ?because when carry out the onClicked:{},the TextEdit can not input

June 14, 2011

Franzk Franzk
Lab Rat
830 posts

What do you mean by canceling the signal? Maybe it would help to include some code so people can see what goes wrong.

By the way, it’s spelled signal not singal.

 Signature 

“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

http://www.catb.org/~esr/faqs/smart-questions.html

June 14, 2011

sfjam sfjam
Lab Rat
41 posts

  1.            TextEdit{
  2.  
  3.              MouseArea{
  4.               anchors.fill:parent
  5.                onClicked:{
  6.                    
  7.                     、、、、、  
  8.                    }
  9.                     }
  10.             }
after the signal has been handled,the TextEdit can not input

June 14, 2011

Vijay Bhaska Reddy Vijay Bhaska Reddy
Lab Rat
399 posts

After handling inside your onClicked, may be you need to pass the events to TextEdit’s onClicked for it to handle. Don’t know how to do it.

By handling onClicked() in your code, you are preventing default onClicked inside TextEdit.

June 14, 2011

Lukas Geyer Lukas Geyer
Gene Splicer
2074 posts

Déjà-vu?

http://developer.qt.nokia.com/forums/viewthread/6763/ [developer.qt.nokia.com]
http://developer.qt.nokia.com/forums/viewthread/6684/ [developer.qt.nokia.com]

June 14, 2011

sfjam sfjam
Lab Rat
41 posts

after handled the onClicked{}defined by myself,how to recover to the default handle about Click signal in TextEdit

June 14, 2011

Vijay Bhaska Reddy Vijay Bhaska Reddy
Lab Rat
399 posts

Can you try out

  1.  MouseArea {
  2.      Connections {
  3.          onClicked: onClickedHandler()
  4.      }
  5.  }

Now implement your onClickedHandler function.
I don’t know if this works, but worth a try.

June 14, 2011

sfjam sfjam
Lab Rat
41 posts

follow you advice,i did a test,but it does not work!

June 15, 2011

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

I’ve merged your three posts. Please don’t create similar posts again.

June 16, 2011

Vijay Bhaska Reddy Vijay Bhaska Reddy
Lab Rat
399 posts

Can you post this question to “TROLLS” and see their response. And do let us know their response :)

June 17, 2011

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

Vijay, it was asked and response is somewhere in this forum. Try to use search.

 
  ‹‹ [sloved]convert int to string in qml?      about singal processing ››

You must log in to post a reply. Not a member yet? Register here!