Quote Originally Posted by user03 View Post
Okay, I have defined two slots called hasSample and getSample, hasSample when queried returns true/false (boolean) and getSample returns the value to be plotted (int). Below are the two functions
Yes, these look ok and you already said they work.

As I said in my last comment, you need to notify the QML side about new data.
So add a signal and emit it when new data arrives.

Then you react to that signal in QML, e.g. by connecting a function to it or by using a Connections element.

In both cases I would recommend to move the code that clears and fills the plot into a function.
Then it can be called from onCompleted and the signal handler.

Quote Originally Posted by user03 View Post
Also, I found this link: http://doc.qt.io/qt-5/qtqml-cppinteg...mlfromcpp.html . May be I need to access the QQmlProperty? Thank you.
No, this has nothing to do with what you need here.

Cheers,
_