Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to access secondary camera device using QML camera element ?

How to access secondary camera device using QML camera element ?

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 8 Posters 7.3k Views 1 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.
  • S Offline
    S Offline
    suraj.pavaskar
    wrote on last edited by
    #1

    Hi,

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexander
      wrote on last edited by
      #2

      You can't do it. one way if you create own qml item.

      1 Reply Last reply
      1
      • S Offline
        S Offline
        strekazoid
        wrote on last edited by
        #3

        I'd like that as well.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kwhitefoot
          wrote on last edited by
          #4

          I know this is an old thread but perhaps someone might find this information useful.
          See this entry on xmlich02's implementation of a front camera class on Nokia Developer: https://www.developer.nokia.com/Community/Wiki/Secondary_camera_in_QML.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            conny
            wrote on last edited by
            #5

            I've got a solution to that on the mailing list. It's working for me.
            http://lists.qt-project.org/pipermail/interest/2014-January/010475.html

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              And official support for this is planned for Qt 5.3.

              (Z(:^

              1 Reply Last reply
              0
              • GianlucaG Offline
                GianlucaG Offline
                Gianluca
                wrote on last edited by
                #7

                Qt 5.3 is out ... but I can't find a way to select the front camera.
                How can I do that ?

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mynameisjohn
                  wrote on last edited by
                  #8

                  Conny's post has an answer that should work. I know nothing about offficial support.

                  [quote author="conny" date="1389340978"]I've got a solution to that on the mailing list. It's working for me.
                  http://lists.qt-project.org/pipermail/interest/2014-January/010475.html
                  [/quote]

                  1 Reply Last reply
                  0
                  • GianlucaG Offline
                    GianlucaG Offline
                    Gianluca
                    wrote on last edited by
                    #9

                    [quote author="sierdzio" date="1389343910"]And official support for this is planned for Qt 5.3.[/quote]

                    @sierdzio : do you know if the support has been added or not ? Where did you get the information about the addition of official support in Qt 5.3 ?

                    1 Reply Last reply
                    0
                    • sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #10

                      I follow the Qt development mailing list, that is where I've got the information. I do not know whether this change was really merged into the release.

                      (Z(:^

                      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