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

Signal are not propagated to another signal with connect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.14.1
    • Core: Other
    • None
    • Windows x64
    • Windows
    • Not a bug

      From [Signals & Slots|https://doc.qt.io/qt-5/signalsandslots.html]

      You can connect as many signals as you want to a single slot, and a signal can be connected to as many slots as you need. It is even possible to connect a signal directly to another signal. (This will emit the second signal immediately whenever the first is emitted.)

      The attached case connects signals to signals, but the signals are not propagated.  Class1 has a time that emits a timer signal every second.  That signal is correctly serviced by Class1.

      Class1 is created by Class2.  Class2 connects Class1's clicked signal to Class2's clicked signal, but it does not get invoked.

        1. Class1.h
          0.4 kB
          Doug Rogers
        2. Class2.h
          0.3 kB
          Doug Rogers
        3. Class3.h
          0.4 kB
          Doug Rogers
        4. test-signal.cpp
          0.2 kB
          Doug Rogers
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            doug_rogers Doug Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes