Cleanup of the focus order.

Some non-essential components should never get keyboard focus.

So, now the focus order is as follows:

TranslateLine -> TabWidget -> ArticleView -> DictsList, nothing else.
This commit is contained in:
Tvangeste 2011-06-28 17:55:41 +02:00
parent d23c79f632
commit 98ce9b3256
2 changed files with 6 additions and 0 deletions

View file

@ -63,9 +63,12 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
wordListDefaultFont = ui.wordList->font();
translateLineDefaultFont = ui.translateLine->font();
ui.wordList->setFocusPolicy(Qt::ClickFocus);
// Make the search pane's titlebar
groupLabel.setText( tr( "Look up in:" ) );
groupList.setFocusPolicy(Qt::ClickFocus);
searchPaneTitleBarLayout.setContentsMargins( 8, 5, 8, 4 );
searchPaneTitleBarLayout.addWidget( &groupLabel );
@ -319,6 +322,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
this, SLOT( forwardClicked() ) );
addTab.setAutoRaise( true );
addTab.setFocusPolicy(Qt::ClickFocus);
addTab.setIcon( QIcon( ":/icons/addtab.png" ) );
ui.tabWidget->setHideSingleTab(cfg.preferences.hideSingleTab);
@ -832,6 +836,7 @@ void MainWindow::createTabList()
tabListButton->setMenu(tabListMenu);
tabListButton->setPopupMode(QToolButton::InstantPopup);
ui.tabWidget->setCornerWidget(tabListButton);
tabListButton->setFocusPolicy(Qt::ClickFocus);
}
void MainWindow::fillWindowsMenu()

View file

@ -443,6 +443,7 @@
<tabstops>
<tabstop>translateLine</tabstop>
<tabstop>tabWidget</tabstop>
<tabstop>dictsList</tabstop>
</tabstops>
<resources>
<include location="resources.qrc"/>