source: trunk/doc/src/snippets/widgets-tutorial/windowlayout/main.cpp@ 5

Last change on this file since 5 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 524 bytes
Line 
1#include <QtGui>
2
3int main(int argc, char *argv[])
4{
5 QApplication app(argc, argv);
6 QWidget *window = new QWidget();
7//! [create, lay out widgets and show]
8 QLabel *label = new QLabel(tr("Name:"));
9 QLineEdit *lineEdit = new QLineEdit();
10
11 QHBoxLayout *layout = new QHBoxLayout();
12 layout->addWidget(label);
13 layout->addWidget(lineEdit);
14 window->setLayout(layout);
15//! [create, lay out widgets and show]
16 window->setWindowTitle(tr("Window layout"));
17 window->show();
18 return app.exec();
19}
Note: See TracBrowser for help on using the repository browser.