[Interest] QML type checking quirk
Sze Howe Koh
szehowe.koh at gmail.com
Sun Oct 25 08:42:56 CET 2015
I just found out (during the discussion at
https://forum.qt.io/topic/60021 ) that the following items all give a
height of 100:
// Initialization assignment
height: 100
height: "10" + "0"
height: "10" + 0
height: 10 + "0"
// Imperative assignment
height = "100"
However, this initialization assignment produces an error:
height: "100" // ERROR: "Invalid property assignment: number expected"
Is this intentional? Given that the first 5 examples are all legal,
shouldn't the last one be legal too?
Regards,
Sze-Howe
More information about the Interest
mailing list