summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/widgets-tutorial/childwidget/main.cpp
blob: 8a97810f02bc17fa7d5d5634fef493b3973140db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <QtGui>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QWidget *window = new QWidget();
    window->resize(320, 240);
    window->setWindowTitle(tr("Child widget"));
    window->show();

//! [create, position and show]
    QPushButton *button = new QPushButton(tr("Press me"), window);
    button->move(100, 100);
    button->show();
//! [create, position and show]
    return app.exec();
}