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

SignalSpy qml type throws error when onX slot is present in cpp type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.9.0 Beta 2
    • 5.8.0
    • Testing: QuickTest
    • None

      If a cpp type is exposed to qml via qmlRegisterType,
      and this cpp type contains a signal `x` and a slot `onX`,
      when a `SignalSpy` qml element is connected to signal `x`, an error is thrown:

      `Error: Function.prototype.connect: this object is not a signal`

      This makes it impossible to have interchangeable cpp and qml types with the same API based on the x/onX idiom.

      example to reproduce:

      https://github.com/marco-piccolino/qmltest

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

            Unassigned Unassigned
            marco_piccolino Marco Piccolino
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes