Unsolved Close a QMainWindow from full screen
-
Hello
I have my own QAxWidget application that I need to embed on a QMainWindowWId wid = (WId)FindWindow(L"ScreenClass", nullptr); window = QWindow::fromWinId(wid);
For internal application requirements, I am forced and run QMainWindow with the following flag:
this->setWindowFlags(Qt::WindowDoesNotAcceptFocus);
The application works well, the only problem is that I can't find an event to close the application with Escape key.
I tried that, but it doesn't work because of the WindowDoesNotAcceptFocus flag.void FullScreen::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape) { close(); } }
While with a double click it exits.
void FullScreen::mouseDoubleClickEvent(QMouseEvent *event) { close(); }
What I ask, some ideas to close the application with a key on the keyboard.
Thank you in advance
blackout69