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
| #include <QApplication>
#include <QFont>
#include <QPushButton>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QWidget fenetrep;
fenetrep.resize(800,600);
QPushButton BoutonSeb("Seb",&fenetrep);
QPushButton BoutonJer("Jer",&fenetrep);
QPushButton BoutonThi("Thi",&fenetrep);
QPushButton BoutonEnvoyer("Envoyer",&fenetrep);
QPushButton BoutonQuitter("Quitter",&fenetrep);
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);
QObject::connect(BoutonQuitter,SIGNAL(clicked()),app,SLOT(quit()));
fenetrep.show();
return app.exec();
} |
Partager