[Solved] QScriptEngineDebugger - Frontend appears all disabled. Only work keyboard.



  • 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)?



  • 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);@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.