Dynamic connecting/disconnecting signals and slots

不问归期 提交于 2019-12-11 07:25:49

问题


My program has two states and it can switch between them for some reasons. In these states the program needs to receive different signals, which means it has to connect and disconnect certain signals during the run.

How bad is such approach?


回答1:


It's a fine approach, I've used it before without issues. Depending on what you're actually doing a QSignalMapper might be of use for you.



来源:https://stackoverflow.com/questions/15274147/dynamic-connecting-disconnecting-signals-and-slots

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