summaryrefslogtreecommitdiffstats
path: root/mainwindow.cpp
diff options
context:
space:
mode:
authorScott Wehrenberg <brouwer@annejan.com>2016-02-02 16:33:30 -0600
committerScott Wehrenberg <scott@wehrenberg.us>2016-02-02 16:33:30 -0600
commitdc0aeba511dd579e62cd6e845fd7e7ba3614d002 (patch)
tree20518e86502ec7265a683dc622e0b1e601326c24 /mainwindow.cpp
parent083727614713a7f7197ac9840ace84ffc4dd1ed2 (diff)
Focus the search box when the window becomes active
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 11a3000d..c89a04a4 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -106,6 +106,20 @@ QSettings &MainWindow::getSettings() {
return *settings;
}
+void MainWindow::changeEvent(QEvent *event)
+{
+ QWidget::changeEvent(event);
+ if (event->type() == QEvent::ActivationChange)
+ {
+ if(this->isActiveWindow())
+ {
+ ui->lineEdit->selectAll();
+ ui->lineEdit->setFocus();
+ }
+ }
+}
+
+
void MainWindow::mountWebDav() {
#ifdef Q_OS_WIN
char dst[20] = {0};