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

Add default signal parameters in QML

    XMLWordPrintable

    Details

      Description

      As of ECMAScript 6 (ECMA-262), default parameters are supported. However this gives a syntax error as of 5.15.2.

      A workaround is to use a function wrapper:

      signal mySignal(int x, int y)
      function emitMySignal(x, y = 0) {
      	mySignal(x, y)
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            mmi_puya Puya Daravi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes