[Solved] QScriptEngineDebugger - Frontend appears all disabled. Only work keyboard.
-
wrote on 9 May 2014, 14:04 last edited by
Hello,
When I use the QScriptEngineDebugger, the debugger appears, but all is disabled: menus, buttons, mouse, ... only keyboard works.
For sample, I can push the F10 key and the debugger responds to it, but I can't click any button, resize panels, select a menu, ...
@
QScriptEngine _engine;
QScriptEngineDebugger debugger;
debugger.attachTo(&_engine);
QMainWindow *debugWindow = debugger.standardWindow();
debugger.action(QScriptEngineDebugger::InterruptAction)->trigger();
debugWindow->showNormal();
_engine.evaluate(_program);
@What is happen? Why is the frontend disabled (except keyboard)?
-
wrote on 12 Jul 2014, 18:10 last edited by
I've found it.
This happens when launchs the QScriptEngineDebugger from a QDialog. The dialog continues active and catch the mouse and some keys. Only shortcuts works on QScriptEngineDebugger.
The solution is hide the dialog before QScripEngineDebugger appears.
I put this code inside a slot launched by a button that appears on the dialog:
@ QWidget *root = parentWidget();
while (root->parentWidget() != nullptr) {
root = root->parentWidget();
}
root->setVisible(false);@