Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 6.0.1
-
None
-
Ubuntu 20.04.3 LTS
Description
I'm playing with the code from your QT6 documentation and when I'm trying to auto-format (ReformatFile) copied code, the editor remove types from function signature. So after saving this code:
Item { function myQmlFunction(msg: string) : string { console.log("Got message:", msg) return "some return value" } }
I getÂ
Item { function myQmlFunction(msg) { console.log("Got message:", msg) return "some return value" } }
And then the compiler can't bind these functions together (because msg becomes a QVariant type):
W libdictionary_x86_64.so: QMetaObject::invokeMethod: No such method QQuickItem_QML_16::myQmlFunction(QString) W libdictionary_x86_64.so: Candidates are: W libdictionary_x86_64.so: myQmlFunction(QVariant)