Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.12.1
-
-
1edf84eff083eb5412b4c5c7cd3bd8166f15f61f (qt/qtquickcontrols/5.12)
Description
For Dialog (QtQuick.Dialogs 1.3) title, user is able to set it dynamically. whereas Label text can be set easily.
In Below code, Title for Dialog is not getting set when a function is used.
Dialog { function newTitle(){ return "new text"; } id: textDialog visible: true title: newTitle() // Does not work // title : "title123" //This works fine onAccepted: {console.log(title)} width:500 contentItem.width: 500; contentItem.implicitWidth: 500; Label { text: newTitle() anchors.fill: parent wrapMode: Text.WrapAtWordBoundaryOrAnywhere } }
Refer to the attached sample code. You can see that title for dialog does not get set to return value of newTitle()