equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the examples of the Qt Toolkit. |
7 ** This file is part of the examples of the Qt Toolkit. |
8 ** |
8 ** |
54 QVBoxLayout *layout = new QVBoxLayout; |
54 QVBoxLayout *layout = new QVBoxLayout; |
55 layout->addWidget(wigglyWidget); |
55 layout->addWidget(wigglyWidget); |
56 layout->addWidget(lineEdit); |
56 layout->addWidget(lineEdit); |
57 setLayout(layout); |
57 setLayout(layout); |
58 |
58 |
|
59 #ifdef QT_SOFTKEYS_ENABLED |
|
60 QAction *exitAction = new QAction(tr("Exit"), this); |
|
61 exitAction->setSoftKeyRole(QAction::NegativeSoftKey); |
|
62 connect (exitAction, SIGNAL(triggered()),this, SLOT(close())); |
|
63 addAction (exitAction); |
|
64 |
|
65 Qt::WindowFlags flags = windowFlags(); |
|
66 flags |= Qt::WindowSoftkeysVisibleHint; |
|
67 setWindowFlags(flags); |
|
68 #endif |
|
69 |
59 connect(lineEdit, SIGNAL(textChanged(QString)), |
70 connect(lineEdit, SIGNAL(textChanged(QString)), |
60 wigglyWidget, SLOT(setText(QString))); |
71 wigglyWidget, SLOT(setText(QString))); |
61 if (!smallScreen){ |
72 if (!smallScreen){ |
62 lineEdit->setText(tr("Hello world!")); |
73 lineEdit->setText(tr("Hello world!")); |
63 } |
74 } |