Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Torch QML type
Qt 6.11 is out! See what's new in the release blog

Torch QML type

Scheduled Pinned Locked Moved Unsolved India
7 Posts 2 Posters 4.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vikasawadhiya
    wrote on last edited by
    #1

    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?

    ? 1 Reply Last reply
    0
    • V vikasawadhiya

      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?

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vikasawadhiya
        wrote on last edited by
        #3

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

        ? 1 Reply Last reply
        0
        • V vikasawadhiya

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

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          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()
          }
          
          1 Reply Last reply
          0
          • V Offline
            V Offline
            vikasawadhiya
            wrote on last edited by
            #5

            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)

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #6

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

              1 Reply Last reply
              1
              • V Offline
                V Offline
                vikasawadhiya
                wrote on last edited by vikasawadhiya
                #7

                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.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved