Qt 6.11 is out! See what's new in the release
blog
Connections problem
-
I have a signal in C++:
emit(mySignal(bool));I have a connection in qml:
Connections { target: cppObject onMySignal: argument ? "true" : "false" }When I surround the connection in curly braces:
Connections { target: cppObject onMySignal: { argument ? "true" : "false" } }I get a
ReferenceErrorthat argument is not defined, but not with the curly braces, why is this? -
What is argument here ? Either way it should give you problem. Argument should be variable name defined in your signal. I did not see that. Also when you emit the signal, you should give the value than type. Here you are adding as bool. It should true/false