You can emit signals between threads (a queued connection).
You could emit a signal from a client thread:
signals:
void messageArrived(const QString& message);
signals:
void messageArrived(const QString& message);
To copy to clipboard, switch view to plain text mode
emit messageArrived("blaa");
emit messageArrived("blaa");
To copy to clipboard, switch view to plain text mode
Then you have at least 2 ways to deliver the message for other clients:
1) Create a connection between the server object (which creates and launches client threads) and all the clients. Pass the arrived message to all interested clients.
2) Create connections between all client threads, so when a client thread emits an arrived message, all other clients receive it directly..
Bookmarks