You cannot do that in QML. You have to use the native API.