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

StackView Components cannot resolve binding in release

    XMLWordPrintable

Details

    • Windows
    • 8272eef2d736351d2ba41590680da395647a874e

    Description

      The following example produces an error in Release (debug works).

      In Qt 6.2.3 it worked fine. 

      qrc:/untitled/main.qml:18:13: Unable to assign [undefined] to QString

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          id: root
          visible: true
          width: 1366
          height: 769
          StackView {
              id: stack
              anchors.fill: parent
              initialItem: comp
          }
      
          Component {
              id: comp
              Pane {
                  property string title: {
                      //adding a print here fixes the issue
                      //console.log("")
                      return editMode ? qsTr("Edit") : qsTr("Create")
                  }
                  property bool editMode: true
                  Label {
                      text: title
                      anchors.centerIn: parent
                  }
              }
          }
      }

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              mugi_luffy Hamza Mlayeh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes