diff options
Diffstat (limited to 'doc/src/snippets/widgets-tutorial/toplevel/main.cpp')
-rw-r--r-- | doc/src/snippets/widgets-tutorial/toplevel/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/src/snippets/widgets-tutorial/toplevel/main.cpp b/doc/src/snippets/widgets-tutorial/toplevel/main.cpp new file mode 100644 index 0000000..cffdff8 --- /dev/null +++ b/doc/src/snippets/widgets-tutorial/toplevel/main.cpp @@ -0,0 +1,13 @@ +#include <QtGui> + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); +//! [create, resize and show] + QWidget *window = new QWidget(); + window->resize(320, 240); + window->show(); +//! [create, resize and show] + window->setWindowTitle(tr("Top-level widget")); + return app.exec(); +} |