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
|
#include <QApplication>
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QWidget fenetre;
fenetre.setWindowTitle("Ma fenetre");
QFrame *frame = new QFrame(&fenetre);
frame->setFrameShape(QFrame::StyledPanel);
frame->setGeometry(60, 35, 240, 160);
QLineEdit *lineEdit = new QLineEdit("Entrer votre nom");
QPushButton *bouton1 = new QPushButton("Cliquer ici");
QProgressBar *progress = new QProgressBar;
progress->setValue(00);
QVBoxLayout *vbox = new QVBoxLayout;
vbox->addWidget(lineEdit);
vbox->addWidget(bouton1);
vbox->addWidget(progress);
frame->setLayout(vbox);
fenetre.show();
return app.exec();
} |
Partager