Gui: Use postEvent instead of sendEvent for Esc handling
See https://github.com/FreeCAD/FreeCAD/pull/24277#issuecomment-3342091132 Co-authored-by: wwmayer <wmayer@freecad.org>
This commit is contained in:
@@ -239,7 +239,7 @@ void ViewProvider::eventCallback(void * ud, SoEventCallback * node)
|
||||
DockWindowManager* pDockMgr = DockWindowManager::instance();
|
||||
if (QWidget* widget = pDockMgr->getDockWindow("Tasks")) {
|
||||
QKeyEvent ev(QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier);
|
||||
qApp->sendEvent(widget, &ev);
|
||||
qApp->postEvent(widget, &ev);
|
||||
}
|
||||
|
||||
auto func = new Gui::TimerFunction();
|
||||
|
||||
Reference in New Issue
Block a user