To do so I used in my widget :
Code: Select all
Gui::MDIView* mdi = Gui::Application::Instance->activeDocument()->getActiveView();
mdi->setFocus();
Especially since when I'm in edit mode, no tool open (so the widget gives the focus this way) then pressing Q crash gives an illegal storage access error.
So I guess it's giving the focus to the wrong thing where it tries to launch something linked to Q.
Edit: other keys that are not launching a tool in sketcher all gives that errors.