Signal QQmlEngine::quit() emitted, but no receivers connected to handle it quit
1、问题描述
在QML中调用Qt.quit()但是程序没有退出
Keys.onPressed: { switch(event.key) { case Qt.Key_M: Qt.quit(); break; } }
2、解决
//main.cpp QApplication app(argc, argv); QQuickView viewer; QObject::connect(viewer.engine(), SIGNAL(quit()), &app, SLOT(quit()));
长风破浪会有时,直挂云帆济沧海!
可通过下方链接找到博主
https://www.cnblogs.com/judes/p/10875138.html