1.1 --- a/findwidget.cpp Mon Mar 08 12:24:26 2010 +0000
1.2 +++ b/findwidget.cpp Fri Apr 09 14:24:04 2010 +0000
1.3 @@ -46,13 +46,17 @@
1.4
1.5 nextbutton = new QPushButton;
1.6 nextbutton->setText (tr("Next","Find widget"));
1.7 - nextbutton->setDefault (true);
1.8 - nextbutton->setShortcut (Qt::Key_Return);
1.9 connect ( nextbutton, SIGNAL( clicked() ), this, SLOT( nextPressed() ) );
1.10
1.11 + // QAction needed to only activate shortcut while FindWidget has focus
1.12 + QAction *a=new QAction (nextbutton->text(),this);
1.13 + a->setShortcut (Qt::Key_Return);
1.14 + a->setShortcutContext (Qt::WidgetWithChildrenShortcut);
1.15 + connect ( a, SIGNAL( triggered() ), this, SLOT( nextPressed() ) );
1.16 + addAction (a);
1.17 +
1.18 showAllButton = new QPushButton;
1.19 showAllButton->setText (tr("Show all","Find widget"));
1.20 - //connect ( showAllButton, SIGNAL( clicked() ), this, SLOT( showAllPressed() ) );
1.21 connect ( showAllButton, SIGNAL( clicked() ), mainWindow, SLOT( editOpenFindWidget() ) );
1.22
1.23 row2Layout->addWidget (cancelbutton);