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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.9.0 Beta 2
    • Component/s: Testing: QuickTest
    • Labels:
      None

      Description

      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

        Attachments

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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes