Set focus to variable chooser when it opens.

Task-number: QTCREATORBUG-4307

Change-Id: I8dff162c01ced12f1b715ce6c803f7b611625abf
Reviewed-on: http://codereview.qt.nokia.com/918
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
This commit is contained in:
con
2011-06-28 15:28:29 +02:00
committed by Robert Löhning
parent d6c376e406
commit 050fdf9d52

View File

@@ -52,6 +52,7 @@ VariableChooser::VariableChooser(QWidget *parent) :
ui->variableList->setAttribute(Qt::WA_MacShowFocusRect, false); ui->variableList->setAttribute(Qt::WA_MacShowFocusRect, false);
ui->variableDescription->setAttribute(Qt::WA_MacSmallSize); ui->variableDescription->setAttribute(Qt::WA_MacSmallSize);
setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint); setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint);
setFocusPolicy(Qt::StrongFocus);
setFocusProxy(ui->variableList); setFocusProxy(ui->variableList);
VariableManager *vm = VariableManager::instance(); VariableManager *vm = VariableManager::instance();
@@ -155,6 +156,8 @@ void VariableChooser::updatePositionAndShow()
move(parentCenter.x() - width()/2, parentCenter.y() - height()/2); move(parentCenter.x() - width()/2, parentCenter.y() - height()/2);
} }
show(); show();
raise();
activateWindow();
} }
void VariableChooser::handleItemActivated(QListWidgetItem *item) void VariableChooser::handleItemActivated(QListWidgetItem *item)