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. How to capture Qml TextArea typing event?

How to capture Qml TextArea typing event?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
9 Posts 3 Posters 2.6k Views 3 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.
  • L Offline
    L Offline
    lemta2000
    wrote on last edited by
    #1

    Hi,
    Anyone know how to capture textarea typing (start editing and editing) ? It has only editingFinished event .
    Thanks!

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @lemta2000 onTextChanged handler is invoked when typing starts.

      157

      mrjjM 1 Reply Last reply
      3
      • p3c0P p3c0

        @lemta2000 onTextChanged handler is invoked when typing starts.

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @p3c0
        Can i be a QML noob and ask why such signals is not listed?

        http://doc.qt.io/qt-5/qml-qtquick-controls-textarea.html

        Where would i have seen that it has onTextChanged also ?

        1 Reply Last reply
        1
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          @mrjj In QML each property defined in a QML type has a signal and which have corresponding signal handler defined as on<Property>Changed.
          More info here:
          http://doc.qt.io/qt-5/qtqml-syntax-signals.html#property-change-signal-handlers

          157

          mrjjM 1 Reply Last reply
          3
          • p3c0P p3c0

            @mrjj In QML each property defined in a QML type has a signal and which have corresponding signal handler defined as on<Property>Changed.
            More info here:
            http://doc.qt.io/qt-5/qtqml-syntax-signals.html#property-change-signal-handlers

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @p3c0
            Ahh, that is smart !
            So any property is automatically a signal.
            so you could also hook up to OnwidthChanged and so on.
            thank you :)

            1 Reply Last reply
            1
            • p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by
              #6

              @mrjj In the backend they are just Q_PROPERTY's where they have a setter, getter and a signal.
              For eg.
              https://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickitem.h.html#109

              157

              mrjjM 1 Reply Last reply
              1
              • p3c0P p3c0

                @mrjj In the backend they are just Q_PROPERTY's where they have a setter, getter and a signal.
                For eg.
                https://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickitem.h.html#109

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @p3c0
                Aha, its not so magical, just a normal QObject :)
                Thx. I should try QML at some time. seems to mix nicely with c++.

                1 Reply Last reply
                1
                • p3c0P Offline
                  p3c0P Offline
                  p3c0
                  Moderators
                  wrote on last edited by
                  #8

                  @mrjj You should definitely :)

                  157

                  1 Reply Last reply
                  2
                  • L Offline
                    L Offline
                    lemta2000
                    wrote on last edited by
                    #9

                    @p3c0: thanks for your answer :)

                    1 Reply Last reply
                    1

                    • Login

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