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

signal.connect does not work with arguments in QML JS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 4.8.4
    • None

    Description

      If you have a signal with an object argument, like MouseArea.clicked, and connect that signal to a function in a JS file using the connect function, like mouseArea.clicked.connect(Script.func), then the signal argument is wrapped in an extra QVariant and not usable in the JS function. Note that it works perfectly fine if you call function with the signal argument from the handler, like onClicked: Script.func(mouse).

      This does not appear in QML 2.

      Attachments

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

        Activity

          People

            aalpert Alan Alpert
            aalpert Alan Alpert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes