How to programme a main function inside a GUI interface with button callbacks working as interruptions

心已入冬 提交于 2019-12-24 20:09:36

问题


Is it possible to create an interface that execute a main and the callbacks functions works as interruptions? I need an user interface that when the user push an on button the program starts to take images from a camera and then procesed them and show them on the interface. The program needs image changing on the user interface until the button on is pushed again and it interrupt the main programme that are catching and processing images

Main function takes images from a camera and process them consecutively with a timer. Them I need a GUI interface that starts the process with a button and them stop it with another button. My problem is how can I call a function that may be running until it is interrupted by another pushed button. I mean how can I create a main function that is interrupted by callback in the user interface.

来源:https://stackoverflow.com/questions/55892043/how-to-programme-a-main-function-inside-a-gui-interface-with-button-callbacks-wo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!