diff options
Diffstat (limited to 'examples/tutorials/gettingStarted/gsQt/part2/main.cpp')
-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(); |