Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-3190

QPushButton.clicked.disconnect() asymmetric to connect() (multiple index-based connections)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.10.1, 6.11.0
    • 6.9.1
    • PySide
    • None
    • Linux/X11
    • c50f38ee5 (dev), c5dcdff80 (6.10)

      I have three push buttons: the sender button ('Click me!') that i connect to a slot named on_button_clicked(). Two other buttons connect/disconnect the sender's clicked signal to the slot.

      I click on a button to create a signal-slot connection for another button (the 'Click me!' button). Clicking 10 times creates 10 connections. Clicking the sender button executes the slot 10 times. Clicking the disconnect button removes one connection. Clicking the disconnect button again disconnect all the remaining 9 connections and further clicks on the sender button do not execute the slot:

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      9

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      Button clicked

      8
      <<< at this point clicking the sender button does not execute the signal

      /home/jon/Documents/java/eclipse-workspace/PySideLearning/bugs/01_disconnect.py:51: RuntimeWarning: Failed to disconnect (<bound method Window.on_button_clicked of <_main_.Window(0x55a9352caea0) at 0x7f91aaf56300>>) from signal "clicked()".

      ok = self.button.clicked.disconnect(self.on_button_clicked)

      Failed to disconnect

      8

       

        1. pyside3190.py
          3 kB
        2. pyside3190_pyqt.py
          2 kB
        3. pyside3190_log.txt
          2 kB
        4. pyside3190_diag.diff
          3 kB
        5. 01_disconnect.py
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kleint Friedemann Kleint
            anonimista Anonimista *
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes