summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/widgets/toplevel/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorials/widgets/toplevel/main.cpp')
-rw-r--r--examples/tutorials/widgets/toplevel/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/tutorials/widgets/toplevel/main.cpp b/examples/tutorials/widgets/toplevel/main.cpp
index c966037..25ebd3f 100644
--- a/examples/tutorials/widgets/toplevel/main.cpp
+++ b/examples/tutorials/widgets/toplevel/main.cpp
@@ -46,11 +46,11 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
//! [create, resize and show]
- QWidget *window = new QWidget();
- window->resize(320, 240);
- window->show();
+ QWidget window;
+ window.resize(320, 240);
+ window.show();
//! [create, resize and show]
- window->setWindowTitle(tr("Top-level widget"));
+ window.setWindowTitle(QObject::tr("Top-level widget"));
return app.exec();
}
//! [main program]