Make Escape key work

This commit is contained in:
Cacodemon345
2021-12-05 15:57:46 +06:00
parent a74afc3f1e
commit 3a52d62283
3 changed files with 53 additions and 1 deletions

View File

@@ -94,6 +94,14 @@ int main(int argc, char* argv[]) {
main_window = new MainWindow();
main_window->show();
main_window->setFocus();
app.installEventFilter(main_window);
auto widgetList = app.allWidgets();
for (auto curWidget : widgetList)
{
curWidget->setFocusPolicy(Qt::NoFocus);
}
main_window->setFocusPolicy(Qt::StrongFocus);
pc_init(argc, argv);
if (! pc_init_modules()) {