FormLayout: Replace heuristic approach with an instanceof check
This has been available in QML for a while now, and it is being correctly used in other parts on code in the same file.
There's also a link to official Qt docs, but it was
- Hard to find. Seriously, this is a not discoverable feature.
- It does not specify version ("since 5.x"). Not that it really matters, but kinda upsetting.