Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Block Qt Script



  • I need some help regarding the Qt ScriptEngine.

    I would like to define a new script function that blocks the script running and waits for the result.
    Similar to the gets function in C.

    The function should read something from the serial port and the result of the function is the string that it read terminated with NUL. I can use the serial port in Qt. My problem is how I can create a script function that blocks the script running until it gets the result.

    The aim is to create a very simple script system, with which anyone is able to create small scripts which can communicate with an external serial port equipment. No programming skills are required.
    Thanks for your help in advanced.


Log in to reply