How to access secondary camera device using QML camera element ?

I am trying to use QML camera element for taking pictures and directly using it in the application. I want to provide an option to the user to choose between the primary and secondary camera devices of the phone.
By default the primary camera device is accessed by the QML camera element and there is no way to specify the secondary camera if the device has any.
However on core side it is possible to get all the available camera devices using QCamera::availableDevices() API and the desired camera device can be set via constructor of QCamera class.
How to do it in QML ?
Any help on this is much appreciated.