source: trunk/doc/src/snippets/widgets-tutorial/childwidget/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: 427 bytes
Line 
1#include <QtGui>
2
3int main(int argc, char *argv[])
4{
5 QApplication app(argc, argv);
6 QWidget *window = new QWidget();
7 window->resize(320, 240);
8 window->setWindowTitle(tr("Child widget"));
9 window->show();
10
11//! [create, position and show]
12 QPushButton *button = new QPushButton(tr("Press me"), window);
13 button->move(100, 100);
14 button->show();
15//! [create, position and show]
16 return app.exec();
17}
Note: See TracBrowser for help on using the repository browser.