I did a sample application for QML to C++ communication with signal and slot.
I registered the class with “qmlRegisterType” and handled the signal in QML with “connection ”function. I got the signal from the corresponding CPP file in the QML slot. But if I call the signal emitting function from another class I do not receive it at the QML slot. The function call executed successfully, but the signal is not getting in the QML class.

Could it be that, even though it got sent, it was not directed correctly?

How can I correctly create an object for the class and communicate to the QML file?