1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| #define HE
#include <QApplication>
#include <QFont>
#include <QPushButton>
#include <QLabel>
#include <QTextEdit>
#include <QtNetwork\QTcpServer>
#include <QtCore\QObject>
#include "link.h"
using namespace std;
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QWidget fenetrep; /**objet parent*/
/**creation of objects link to the parent */
QPushButton BoutonSeb("Seb",&fenetrep);
QPushButton BoutonJer("Jer",&fenetrep);
QPushButton BoutonThi("Thi",&fenetrep);
QPushButton BoutonEnvoyer("Envoyer",&fenetrep);
QPushButton BoutonQuitter("Quitter",&fenetrep);
QLabel LabelConnection("Label d'info",&fenetrep);
QLabel LabelReceive("Label de reception",&fenetrep);
QTextEdit TextZone(&fenetrep);
link lien("test");
/**end */
/**Resize*/
fenetrep.resize(800,600);
BoutonJer.setGeometry(10, 10,50,30);
BoutonSeb.setGeometry(375, 10,50,30);
BoutonThi.setGeometry(740, 10,50,30);
BoutonEnvoyer.setGeometry(370, 500,75,45);
BoutonQuitter.setGeometry(370,550,75,45);
LabelConnection.setGeometry(10,30,775,45);
LabelReceive.setGeometry(10,60,775,300);
TextZone.setGeometry(10,450,775,45);
/**end*/
/**event*/
QObject::connect(&BoutonQuitter,SIGNAL(clicked()),&app,SLOT(quit()));
/**end*/
/**Server*/
/**end*/
fenetrep.show();
return app.exec();
} |
Partager