How in Qt6 use c++ signal with argument in qml?
-
Hi!
How in Qt6 use c++ signal with argument in qml?
It is nor work:signals: void currentIdSeansForScheduleChanged(int currentIdSeansForSchedule);
Connections { target: AppCore function onCurrentIdSeansForSchedule(idUser) { console.log(2222222) } }
I get the error:
qrc:/Schedule.qml:6:5: QML Connections: Detected function "onCurrentIdSeansForSchedule" in Connections element. This is probably intended to be a signal handler but no signal of the target matches the name.
-
Hi,
If memory serves well it should be:
onCurrentIdSeansForScheduleChanged
-
Then please provide a minimal compilable example that shows the issue.
-
So my suggestion was correct ?