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

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.0 Beta 2
    • 5.8.0
    • Testing: QuickTest
    • 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

            Unassigned Unassigned
            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