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

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes