信号无法接收解决方案 Qt5.7"/>
Signal QQmlEngine::quit() emitted, but no receivers connected to handle it quit信号无法接收解决方案 Qt5.7
问题如题,如果使用的是Rectangle,在main.cpp中include QQmlEngine库,再加上QObject::connect(viewer.engine(), SIGNAL(quit()), &app, SLOT(quit()));
即可。&app也可以用qApp替代。qApp是一个宏。
官方帮助文档:
This function causes the QQmlEngine::quit() signal to be emitted. Within the Prototyping with qmlscene, this causes the launcher application to exit; to quit a C++ application when this method is called, connect the QQmlEngine::quit() signal to the QCoreApplication::quit() slot.
以下是修改安老师的变色矩阵的代码:
main.cpp:
更多推荐
Signal QQmlEngine::quit() emitted, but no receivers connected to handle it quit信
发布评论