Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.3.0
-
None
-
Windows 7, Qt 5.3
Description
When declaring signals in QML, it is possible to specify the type of the parameters or just use a var. As of 5.0, QML types are supported. However, it is not possible to declare a parameter to a signal that is of the same type as the Component that is declaring that signal. Ex:
in MyObject.qml:
signal mySignal(MyObject param)
This throws the error "Invalid signal parameter type: MyObject"
The use case for such a signal is if there are many of an object, and the object must pass itself through the signal so that listeners can know which instance emitted that signal. While this functionality is possible to achieve by declaring the parameter as a var, it seems that it should be possible to specify the correct type instead.
Attachments
Issue Links
- is replaced by
-
QTBUG-35910 Invalid error message about recursive type instantiation
- Open