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

Add default signal parameters in QML

XMLWordPrintable

      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)
      }
      

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

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

              Created:
              Updated:

                There are no open Gerrit changes