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

Binding QString Data to QML Property



  • Hello, let me preface by saying I have little to no coding experience up until the first of this month.

    I'm working on creating an embedded app on a raspberry pi with an arduino receiving serial data and outputting to the Pi.

    I've figured out how to receive the data from the serial port using QtSerial, and I have the data being sent to a QString called "serialOutput".

    My question is how do I get the "serialOutput" QString to bind to a an alias on my QML. I've watched and applied the logic from the Qt automotive cluster tutorial where they use a javascript 'simulator' file to simulate RPM going up and down. I would like to replace that data with my serialOutput data.

    Go easy on me please!


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you read the QML C++ Integration chapter in Qt's documentation ?


Log in to reply