Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
How to check a variant valid or not in qml? The QVariant has an isValid() method to determine it is valid or not. But pass a QVaraint to qml method or property, the isValid() seems disappeared. Is anyone know how to check the variant in qml?
Use 'undefined' instead.
var invalidValue = backend.GetInvalidQVar(); if (invalidValue == undefined) { console.log("Invalid"); } else { console.log("Valid"); }