diff options
author | Geir Vattekar <geir.vattekar@nokia.com> | 2011-07-29 10:03:07 (GMT) |
---|---|---|
committer | Geir Vattekar <geir.vattekar@nokia.com> | 2011-07-29 10:03:07 (GMT) |
commit | 8815bc982b8361517a4376db4eb0e1b402c2bd65 (patch) | |
tree | e96b26ee650caf2dde671c8cf5eaace79fb71b70 /examples | |
parent | 4f2844f31f852a94cbdaa6de2f2e7a719473634a (diff) | |
download | Qt-8815bc982b8361517a4376db4eb0e1b402c2bd65.zip Qt-8815bc982b8361517a4376db4eb0e1b402c2bd65.tar.gz Qt-8815bc982b8361517a4376db4eb0e1b402c2bd65.tar.bz2 |
Doc: Fixes to Qt tutorial
Reviewed-by: Jerome Pasion
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/tutorials/gettingStarted/gsQt/part2/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp index 24b4d77..afa26e1 100755 --- a/examples/tutorials/gettingStarted/gsQt/part2/main.cpp +++ b/examples/tutorials/gettingStarted/gsQt/part2/main.cpp @@ -44,17 +44,17 @@ int main(int argv, char **args) { QApplication app(argv, args); - QTextEdit textEdit; - QPushButton quitButton("&Quit"); + QTextEdit *textEdit = new QTextEdit; + QPushButton *quitButton = new QPushButton("&Quit"); - QObject::connect(&quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); + QObject::connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); - QVBoxLayout layout; - layout.addWidget(&textEdit); - layout.addWidget(&quitButton); + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(textEdit); + layout->addWidget(quitButton); QWidget window; - window.setLayout(&layout); + window.setLayout(layout); window.show(); |