diff -r 832e96c9abb6 -r 988f1908a7c4 findwidget.cpp --- a/findwidget.cpp Mon Mar 08 12:24:26 2010 +0000 +++ b/findwidget.cpp Fri Jul 23 16:43:49 2010 +0000 @@ -46,13 +46,17 @@ nextbutton = new QPushButton; nextbutton->setText (tr("Next","Find widget")); - nextbutton->setDefault (true); - nextbutton->setShortcut (Qt::Key_Return); connect ( nextbutton, SIGNAL( clicked() ), this, SLOT( nextPressed() ) ); + // QAction needed to only activate shortcut while FindWidget has focus + QAction *a=new QAction (nextbutton->text(),this); + a->setShortcut (Qt::Key_Return); + a->setShortcutContext (Qt::WidgetWithChildrenShortcut); + connect ( a, SIGNAL( triggered() ), this, SLOT( nextPressed() ) ); + addAction (a); + showAllButton = new QPushButton; showAllButton->setText (tr("Show all","Find widget")); - //connect ( showAllButton, SIGNAL( clicked() ), this, SLOT( showAllPressed() ) ); connect ( showAllButton, SIGNAL( clicked() ), mainWindow, SLOT( editOpenFindWidget() ) ); row2Layout->addWidget (cancelbutton);