Property binding not updating



  • Hello
    Something strange happen !

    I put many properties in Qml and c++ but 4 of them updating andn 6 of them do not updating!

    All properties are changed and emit signal sent the problem is here

    if I put console log in my code

    MyBasicText {
                anchors.fill: parent
                horizontalAlignment: Text.AlignHCenter
                text: {
                    console.log(myXML.arzeshSahm2)
                    myXML.arzeshSahm2
                }
            }
    

    each time myXML.arzeshSahm2 is changed this log happend

    qrc:/Result.qml:206:19: Unable to assign long to QString
    qml: 4054
    qrc:/Result.qml:206:19: Unable to assign long to QString
    qml: 2975
    qrc:/Result.qml:206:19: Unable to assign long to QString
    

    Value changed and error occurred its Ok
    But if I use .toString()

    MyBasicText {
                anchors.fill: parent
                horizontalAlignment: Text.AlignHCenter
                text: {
                    console.log(myXML.arzeshSahm2)
                    myXML.arzeshSahm2.toString()
                }
            }
    

    No error happen and no log show and no change shown
    Only first time value shown and after this no change shown

    But this code work for my other property
    Both property are same in definition

    My other property that work here :

    MyBasicText {
                anchors.fill: parent
                horizontalAlignment: Text.AlignHCenter
                text: myXML.tedadSahm2.toString()
            }
    

    This code work correctly
    I put log for testing only


Log in to reply