Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-112408 Make SignalTransition compilable with qmlsc
  3. QTBUG-112409

Make SignalTransition.signal compilable with qmlsc

    XMLWordPrintable

Details

    Description

      Code (adapted from https://doc.qt.io/qt-6/qml-qtqml-statemachine-signaltransition.html#signal-prop )

      import QtQuick
      import QtQuick.Controls.Basic
      import QtQml.StateMachine as DSM
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Button {
              anchors.fill: parent
              id: button
              DSM.StateMachine {
                  DSM.State {
                      DSM.SignalTransition {
                          targetState: finalState
                          signal: button.clicked
                      }
                  }
                  DSM.FinalState {
                      id: finalState
                  }
              }
          }
      }
      

       

      Compiler output

      Warning: main.qml:17:36: Could not compile binding for signal: Cannot generate efficient code for lookup of function property. [compiler]
                          signal: button.clicked
                                         ^^^^^^^
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes