examples/widgets/wiggly/dialog.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 30 5dc02b23752f
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
    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
    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);
    60 
    64 
    61     QAction *exitAction = new QAction(tr("Exit"), this); 
    65     Qt::WindowFlags flags = windowFlags();
    62     exitAction->setSoftKeyRole(QAction::NegativeSoftKey); 
    66     flags |= Qt::WindowSoftkeysVisibleHint;
    63     connect (exitAction, SIGNAL(triggered()),this, SLOT(close())); 
    67     setWindowFlags(flags);
    64     addAction (exitAction); 
       
    65 
       
    66 #endif
    68 #endif
    67 
       
    68 
    69 
    69     connect(lineEdit, SIGNAL(textChanged(QString)),
    70     connect(lineEdit, SIGNAL(textChanged(QString)),
    70             wigglyWidget, SLOT(setText(QString)));
    71             wigglyWidget, SLOT(setText(QString)));
    71     if (!smallScreen){
    72     if (!smallScreen){
    72         lineEdit->setText(tr("Hello world!"));
    73         lineEdit->setText(tr("Hello world!"));