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

change signal of contentData and contentChildren in Dialog doesn't work

    XMLWordPrintable

Details

    Description

      the below code gives the error:
      Cannot assign to non-existent property "onContentDataChanged"
      and it expected can works without error as it is a valid property, it shall have an onPropertyChanged signal.
      https://doc.qt.io/qt-6/qml-qtquick-controls2-popup.html

          Dialog {
              Text {
                  text: qsTr("text")
              }
              onContentDataChanged: {
                  console.log(contentData)
              }
          }
      

      the below code can run, but the onContentChildrenChanged never triggers.
      it is expected triggered once because there is visual children's item inside it.
      and value of contentChildren shall be one Text item.

          Dialog {
              Text {
                  text: qsTr("text")
              }
              onContentChildrenChanged: {
                  console.log(contentChildren)
              }
          }
      

      Attachments

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jiu shanheng jiu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: