refocus input if a single instance window is resurfaced
Signed-off-by: Albert S <mail@quitesimple.org>
This commit is contained in:
parent
18e046d028
commit
ea697d62ba
2
main.cpp
2
main.cpp
@ -86,9 +86,11 @@ int main(int argc, char *argv[])
|
|||||||
w->showMaximized();
|
w->showMaximized();
|
||||||
w->activateWindow();
|
w->activateWindow();
|
||||||
w->raise();
|
w->raise();
|
||||||
|
w->focusInput();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
w->showMaximized();
|
w->showMaximized();
|
||||||
|
w->focusInput();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,3 +423,7 @@ bool Window::eventFilter(QObject *obj, QEvent *event)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::focusInput()
|
||||||
|
{
|
||||||
|
this->lineEdit->setFocus();
|
||||||
|
}
|
1
window.h
1
window.h
@ -74,6 +74,7 @@ public:
|
|||||||
Window(ConfigProvider &configProvider);
|
Window(ConfigProvider &configProvider);
|
||||||
void setSystemConfig(const QVector<EntryConfig> &config);
|
void setSystemConfig(const QVector<EntryConfig> &config);
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
void focusInput();
|
||||||
~Window();
|
~Window();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user