Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-4163

Connections View generates deprecated QML code

    XMLWordPrintable

Details

    • All

    Description

      1. Add a slider to your qml
      2. Make a connection e.g. onMoved as shown in the image Connection_View
      3. Qml scene output give following information Screen01.ui.qml:21:9: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function

      Qml code generated:

       

      import QtQuick 2.12
      import untitled 1.0
      import QtQuick.Controls 2.0
      
      Rectangle {
          width: Constants.width
          height: Constants.height
      
          color: Constants.backgroundColor
      
          Text {
              text: qsTr("Hello untitled")
              anchors.centerIn: parent
              font.family: Constants.font.family
          }
      
          Slider {
              id: slider
              value: 0.5
      
              Connections {
                  target: slider
                  onMoved: console.log("clicked")
              }
          }
      }
      
      

       

       

      Attachments

        Activity

          People

            thohartm Thomas Hartmann
            shazter Dirk Büttner
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: