Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. About a signal which will be handled in TextEdit area
Qt 6.11 is out! See what's new in the release blog

About a signal which will be handled in TextEdit area

Scheduled Pinned Locked Moved QML and Qt Quick
16 Posts 7 Posters 5.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sfjam
    wrote on last edited by
    #4

    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

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jim_kaiser
      wrote on last edited by
      #5

      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
      @event->ignore();@

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sfjam
        wrote on last edited by
        #6

        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

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Franzk
          wrote on last edited by
          #7

          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.

          "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

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sfjam
            wrote on last edited by
            #8

            @
            TextEdit{

                     MouseArea{
                      anchors.fill:parent
                       onClicked:{
                            
                            、、、、、   
                           }
                            }
                    }
            

            @ after the signal has been handled,the TextEdit can not input

            1 Reply Last reply
            0
            • T Offline
              T Offline
              thisisbhaskar
              wrote on last edited by
              #9

              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.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lgeyer
                wrote on last edited by
                #10

                Déjà-vu?

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

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sfjam
                  wrote on last edited by
                  #11

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

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    thisisbhaskar
                    wrote on last edited by
                    #12

                    Can you try out
                    @
                    MouseArea {
                    Connections {
                    onClicked: onClickedHandler()
                    }
                    }@

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

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sfjam
                      wrote on last edited by
                      #13

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

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DenisKormalev
                        wrote on last edited by
                        #14

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

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          thisisbhaskar
                          wrote on last edited by
                          #15

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

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            DenisKormalev
                            wrote on last edited by
                            #16

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

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved