This replaces all the custom code with a shared implementation in QQC2-desktop style
mentioned in commit dada3e30