summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorGeir Vattekar <geir.vattekar@nokia.com>2011-07-29 10:03:07 (GMT)
committerGeir Vattekar <geir.vattekar@nokia.com>2011-07-29 10:03:07 (GMT)
commit8815bc982b8361517a4376db4eb0e1b402c2bd65 (patch)
treee96b26ee650caf2dde671c8cf5eaace79fb71b70 /examples
parent4f2844f31f852a94cbdaa6de2f2e7a719473634a (diff)
downloadQt-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-xexamples/tutorials/gettingStarted/gsQt/part2/main.cpp14
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();