[Interest] Reporting errors from QML objects' property setters

Jan Kundrát jkt at flaska.net
Mon Dec 3 11:10:08 CET 2012


Hi,
QML performs some sanity checks for me; for example, when assigning incompatible types to a property (say, a QString into a property with type of int), I get a nice error message including the location in my QML file.

Can I do the same for custom checks which are implemented in my own setters? A trivial example is "how do I only allow all-uppercase strings in my QString property"?

Cheers,
Jan



More information about the Interest mailing list