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.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/tutorials/widgets/toplevel/main.cpp b/examples/tutorials/widgets/toplevel/main.cpp
index c966037..f18fa6b 100644
--- a/examples/tutorials/widgets/toplevel/main.cpp
+++ b/examples/tutorials/widgets/toplevel/main.cpp
@@ -46,11 +46,12 @@ 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(
+ QApplication::translate("toplevel", "Top-level widget"));
return app.exec();
}
//! [main program]