Torch QML type



  • Torch QML type doesn’t works as documented (tried to use in android). So I would like to know, is there any way to access flashlight directly rather than through Camera QML type, or JNI is required?



  • What exactly do you mean by "does not work as documented"?



  • "Does not work as documented", means it is not working at all (not because of hardware constraint, tried in android)



  • The hardware constraint might be that the light cannot be controlled unless the camera is loaded. You might want to try the following:

    Camera {
      id: camera
      flash.mode: Camera.FlashTorch
    }
    
    Button {
      text: "Light on"
      onClicked: camera.start()
    }
    
    Button {
      text: "Light off"
      onClicked: camera.stop()
    }
    


  • Using Camera Type is ok , but as Torch type claims, it can control flashlight power (in %) which may not even possible with every hardware (varies with different mobiles) that's way i asked, is it working with someone? (not working in my mobile)



  • Oh, next time check the bug database first, please. It's QTBUG-52182.



  • Yes, you're right, i should check the bug database before making post, but the bug means, in specific case, a specific functionality is not working as accepted, and usually it doesn't happen a entire thing is not working and that is a bug. thus why bug database didn't get my attention and i was thinking, it is a problem at my side.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.