How to show data from a thread to status bar?
Unsolved
Qt 6
-
I'm currently working on a project where I have threads that handle user requests, I'm tring to find a way so when user send request I show some information about this user and the request on the main widget's status bar (on the server side) how can I do this?
-
@KyRillos_BoshRa Emit a signal from the thread and connect this signal to a slot in your UI where you update the status bar.
-
but I don't know how to get data that I read inside the thread this way, can you explain more please?
-
@KyRillos_BoshRa The data from the thread can be sent via the signal: it would be simply signal parameter. Please read https://doc.qt.io/qt-6/signalsandslots.html
class MyClass { signals: void mySignal(const QString &myData); // Here myData is an example for data which is passed from signal to slot };