Attached a small example which exposes a C++ API to QML. The C++ API provides two signals:
The QString version is emitted after one second.
On QML the signal is handled like this:
The signal handler is never called. Changing the C++ code to emit both signals will call the QML handler. But only for the int version.
Atleast in https://doc.qt.io/qt-6/qtqml-syntax-signals.html i couldn't find any other way to create the handler which works in both cases. (Or create another handler for the other signal).