diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-09-20 18:15:37 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-09-21 08:08:02 (GMT) |
commit | 7f9e29a79442719fdf1d96ebd046c7155c33bb68 (patch) | |
tree | 5834051cbbeb807b909a33940df711c7ad298333 /examples/widgets | |
parent | 0408e5f70370298de35c45ea68b6551cf6c496fa (diff) | |
download | Qt-7f9e29a79442719fdf1d96ebd046c7155c33bb68.zip Qt-7f9e29a79442719fdf1d96ebd046c7155c33bb68.tar.gz Qt-7f9e29a79442719fdf1d96ebd046c7155c33bb68.tar.bz2 |
Make the 'softkeys' example compile again after softkey changes.
Change to the new API and remove one of the actions since it has no
equivalent in the new framework.
Reviewed-by: Alessandro Portale
Diffstat (limited to 'examples/widgets')
-rw-r--r-- | examples/widgets/softkeys/softkeys.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/examples/widgets/softkeys/softkeys.cpp b/examples/widgets/softkeys/softkeys.cpp index 5d624ef..69b4941 100644 --- a/examples/widgets/softkeys/softkeys.cpp +++ b/examples/widgets/softkeys/softkeys.cpp @@ -50,20 +50,17 @@ MainWindow::MainWindow(QWidget *parent) // Create text editor and set softkeys to it textEditor= new QTextEdit(tr("Navigate in UI to see context sensitive softkeys in action"), this); - QAction* menu = new QAction(tr("Menu"), this); - menu->setSoftKeyRole(QAction::MenuSoftKey); QAction* clear = new QAction(tr("Clear"), this); - clear->setSoftKeyRole(QAction::CancelSoftKey); + clear->setSoftKeyRole(QAction::NegativeSoftKey); - textEditor->addAction(menu); textEditor->addAction(clear); ok = new QAction(tr("Ok"), this); - ok->setSoftKeyRole(QAction::OkSoftKey); + ok->setSoftKeyRole(QAction::PositiveSoftKey); connect(ok, SIGNAL(triggered()), this, SLOT(okPressed())); cancel = new QAction(tr("Cancel"), this); - cancel->setSoftKeyRole(QAction::CancelSoftKey); + cancel->setSoftKeyRole(QAction::NegativeSoftKey); connect(cancel, SIGNAL(triggered()), this, SLOT(cancelPressed())); infoLabel = new QLabel(tr(""), this); |