Get signal from qml into c++ class in Qt
问题 I try to figure out how to get signal from QML code and connect it to slot located in C++ class. I take code from this answer and the control shown on the screen but I can't get the signal. Here is the relevant code: test.qml: import QtQuick 2.4 import QtQuick.Controls 1.3 import QtQuick.Layouts 1.1 Switch{ id: swt; checked:true; onCheckedChanged: swt.qmlSignal(); } menu.cpp: Menu::Menu(QWidget *parent) : QWidget(parent), ui(new Ui::Menu) { ui->setupUi(this); QQuickView *view = new QQuickView