Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML PropertyChanges: Cannot assign to non-existent property "???????" in ARM embedded.



  • Hi,

    I build the Qt embedded 4.7.4 for my ARM embedded board. And I test QML script and everything works fine except "PropertyChanges". Here is the example from the reference document in "QML PropertyChanges Element".

    @
    import QtQuick 1.0

    Item {
    id: container
    width: 300; height: 300

     Rectangle {
         id: rect
         width: 100; height: 100
         color: "red"
    
         MouseArea {
            id: mouseArea
            anchors.fill: parent
         }
    
         states: State {
            name: "resized"; when: mouseArea.pressed
            PropertyChanges { target: rect; color: "blue"; height: container.height }
         }
     }
    

    }
    @

    This sample works fine in my Linux notebook.
    But the error message "PropertyChanges: Cannot assign to non-existent property "???????" will output to console if run in my ARM board. I wander is there any language coding in QML and so the error message show "???????" not property "color". Or there are some parameter miss when I build the Qt embedded for my ARM board.

    Thanks for help.


  • Moderators

    Not entirely on topic, but you may find it hard to get on with people on this forum, if you don't format your code snippets appropriately. You should use "@" tags, and there is no need for "< br >" statements. The code you provided is very hard to read in it's current state - please fix.


  • Moderators

    As for the problem itself, the code is the same as in the documentation, so we won't learn much from that - it is correct, and should work fine.

    I would suspect either build problems, or issues with QML-C++ bridge (I am having such problems now on Android, where code works fine on GNU/Linux, but does not see bridged C++ methods and variables). Does the example get displayed correctly?



  • Yes. The example get displayed correctly. Only I press mouse and get the error message. How do I know is the build problem or QML-C++ bridge issue? And any suggestion to solve it.

    Thanks,


  • Moderators

    If this is the example you're trying to run, then bridging is definitely not a problem (the case with me is that QML does not see C++ objects registered as rootContextObject).

    Have you tried using different colour notation, like "#ff0000" for red? Not very likely to be the cause, but worth trying.


  • Moderators

    Well, I have to blame myself now... the QML-C++ connection works fine in Necessitas, it was my error that caused it not to work.


Log in to reply