Rust-Qt : Signals - Slots - QThread


does anyone has a kind of "basic example" of a Rust-Qt multithreaded application using QThread and signals / slots?

I receive N points from a Oscilloscope that i need to plot in real-time in a QtChart (it's why i need to use a Qthread worker thread) then i need to pass the points from the worker thread to the GUI.

I already checked the "Rust-Qt examples" but unfortunately there is nothing very useful for my case.

Thank you very much in advance.
Best Regards.


I don't know the state of Qt-Rust, but always had issues.
If you can write C++, I would find a good place to split the code and write the Qt part in C++.

You can pass data to C++ via FFI (same process) or sockets (different process).

thank you for your answer! I will give it a try for sure.

Actually my programs run very nicely in C++. I am currently using C++ or Python depending on th application.

I try to avoid C++ because in fact i try to show my company that we could easily replace C++ with RUST for future applications (curves plotting, real time data plotting...), the only requirement is that we can still use Qt5...

I wish you a nice day.
Best Regards.

Replacing the GUI part is tricky so far.
Certainly possible, but more effort.

Depending on what you need to draw, there are various tools to draw vector graphics in realtime.
Pathfinder is the one I am using and a bit involved in.

I would suggest avoiding low level graphics using GL, as there are many (literal) edge-cases to run into.

yes you are right, it's also what i am actually observing, the language itself is very beautiful and elegant but the GUI part is still immature...

Usually i am using QtChart (from Qt5) to plot the real time data (from Oscilloscope or Signal analyser).

I wish you a nice week end.

Best Regards.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.