examples/widgets/wiggly/dialog.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 0 1918ee327afb
child 7 3f74d0d4af4c
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     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 
       
    61     QAction *exitAction = new QAction(tr("Exit"), this); 
       
    62     exitAction->setSoftKeyRole(QAction::NegativeSoftKey); 
       
    63     connect (exitAction, SIGNAL(triggered()),this, SLOT(close())); 
       
    64     addAction (exitAction); 
       
    65 
       
    66 #endif
       
    67 
       
    68 
    59     connect(lineEdit, SIGNAL(textChanged(QString)),
    69     connect(lineEdit, SIGNAL(textChanged(QString)),
    60             wigglyWidget, SLOT(setText(QString)));
    70             wigglyWidget, SLOT(setText(QString)));
    61     if (!smallScreen){
    71     if (!smallScreen){
    62         lineEdit->setText(tr("Hello world!"));
    72         lineEdit->setText(tr("Hello world!"));
    63     }
    73     }