Skip to content

Instantly share code, notes, and snippets.

@oppahero
Created November 9, 2018 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oppahero/853842a7c969ef4a59bb9feb2d298b98 to your computer and use it in GitHub Desktop.
Save oppahero/853842a7c969ef4a59bb9feb2d298b98 to your computer and use it in GitHub Desktop.
void Server::on_client_textSend(QString uname,QString text){
//client that send the signal to this slot
ClientThread* sender_client = (ClientThread*)sender();
QString currentTime = QTime::currentTime().toString("H:m A/");
QString message = "/text:"+currentTime + uname + " : " + text + "\n";
sendTextToAll(message,sender_client);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment