Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Property binding not updating
Forum Update on Monday, May 27th 2025

Property binding not updating

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 562 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cinohee
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved