Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-83224

TextEdit always sends a textChanged signal, after select method calls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.14.2
    • None
    • All

    Description

      When you call select method, it always emit textChanged signal. In my opinion is that this is a mistake, because the text has not changed.

      I attached minimal code to reproduce.
      Code:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
          visible: true
          width: 640
          height: 480
      
          TextEdit {
              text: '123456789'
      
              onTextChanged: console.log('onTextChanged', text)
      
              Component.onCompleted: {
                  select(2, 5)
                  select(2, 5)
                  select(2, 5)
                  select(2, 5)
                  select(2, 5)
              }
          }
      }
      

      Output:

       qml: onTextChanged 123456789
       qml: onTextChanged 123456789
       qml: onTextChanged 123456789
       qml: onTextChanged 123456789
       qml: onTextChanged 123456789
       qml: onTextChanged 123456789
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            freed Igor Bugaev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes