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

QLineEdit::editingFinished should only be triggered once

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.6.1
    • None
    • macOS

      When QLineEdit::editingFinished is connected such:

      connect(ui->lineEdit, &QLineEdit::editingFinished, [this](){
              QMessageBox::warning(this, "There can be ...", "... only one!");
          });

      the signal should not be re-emitted while still in the slot. ( Maybe even until the text is changed again by the user )

      To reproduce:

      • Compile attached example
      • Enter text in LineEdit
      • Click outside the application window so it loses focus
      • Once the messagebox appears, click outside the app window / message box again

      Expected:

      • Only one message box is shown, no matter how often focus is changed

      Actual

      • Everytime the app loses focus, another message box is opened

       

       

        1. image-2024-02-06-10-55-01-473.png
          147 kB
          Marcus Tillmanns
        2. Example.zip
          3 kB
          Marcus Tillmanns
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            madwinter Marcus Tillmanns
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes