CS
VB, VB.NET
ASP.NET,ASP
C, C++
ColdFusion
PHP
Javascript
Delphi
Flash
Java
Graphisme
Irc
Assembleur
C#
Mobilité
SQL
Foxpro
Python
Regex
Flex
Windev
Ce site au démarrage
Derniers codes
Outils
Divers
Connexion
Visual Basic
ASP
C++
ColdFusion
PHP
Javascript
Delphi
Flash
Java
Graphisme
Irc
Assembleur
C#
Mobilité
SQL
Foxpro
Python
Regex
Flex
Statistiques ;-)
Crédits
>>
Sites CodeS-SourceS
Visual basic
C++
C#
Java
PHP
ASP
ASP.NET
ColdFusion
Delphi
Javascript
Flash
Flex / AIR
Graphisme
Assembleur
IRC
Mobilité
SQL
FoxPro
Python
CodeS-SourceS ToolBox
Convertisseur C#<->VB
Colorisation de Code
Table ASCII
Trouver un fichier de code source :
Version Française -
English Version
Accueil
>
C++
>
QL-CHATROOM V 1.0
>
MiniChat/Client/msgprivee.cpp
QL-CHATROOM V 1.0
MiniChat/Client/msgprivee.cpp
Informations sur ce code source
Code Source
QL-CHATROOM V 1.0
Auteur
mature
Fichier
MiniChat/Client/msgprivee.cpp en
C / C++ / C++.NET
Publié le
02/03/2012
Qualité ChatRoom v 1.0 Une application de chat, genre salon de chat avec un administrateur. Programmer par C++, bibliothèque Qt architecture client/serveur. Les sockets sont échangés entre les clients et le serveur par le protocole réseau T
Fichier :
MiniChat/Client/msgprivee.cpp
Nombre de lignes :
22 lignes
Afficher ce fichier en plein écran
#include "
msgprivee.h
"
MsgPrivee::MsgPrivee(QWidget * parent) : QDialog(parent)
{
setupUi(
this
);
socket =
new
QTcpSocket(
this
);
name1->setText(client1);
name2->setText(client2);
connect(envoyer, SIGNAL(clicked()),
this
, SLOT(on_envoyerButton_clicked()));
}
void
MsgPrivee::on_envoyerButton_clicked(){
QString msgP = sayLineEdit->text().trimmed();
if
(!msgP.isEmpty())
socket->write(QString("
/msgP:
" + client2 + "
-
" + msgP + "
\n
").toUtf8());
sayLineEdit->clear();
sayLineEdit->setFocus();
}