summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/widgets/childwidget/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorials/widgets/childwidget/main.cpp')
-rw-r--r--examples/tutorials/widgets/childwidget/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/tutorials/widgets/childwidget/main.cpp b/examples/tutorials/widgets/childwidget/main.cpp
index 99235bd..8674b6e 100644
--- a/examples/tutorials/widgets/childwidget/main.cpp
+++ b/examples/tutorials/widgets/childwidget/main.cpp
@@ -45,13 +45,13 @@
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();
+ QWidget window;
+ window.resize(320, 240);
+ window.setWindowTitle(QObject::tr("Child widget"));
+ window.show();
//! [create, position and show]
- QPushButton *button = new QPushButton(tr("Press me"), window);
+ QPushButton *button = new QPushButton(QObject::tr("Press me"), &window);
button->move(100, 100);
button->show();
//! [create, position and show]