Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1379

Built-in camera application launches when capture button is pressed on QML Camera element

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 1.2.1
    • 1.1.x, 1.2.0
    • Documentation, Multimedia
    • None
    • Nokia N8, Symbian^3, PR1.1, Qt 4.7.2
    • 01c1c6ee0aab9c8f4de2c40704760e54a77dec81 4d84ffe3fc1a46bc04a973e69e3cf29ddd4763b9

    Description

      Using the Qt SDK 1.1 Beta, create a new QML project.

      To the project's .pro file, add

      CONFIG += mobility
      MOBILITY += multimedia
      symbian:TARGET.CAPABILITY += UserEnvironment
      

      In main.qml, write

      import QtQuick 1.0
      import QtMultimediaKit 1.1
      
      Item {
          focus: true
          Keys.onPressed : {
              if (event.key == Qt.Key_CameraFocus && cam.lockStatus == Camera.Unlocked) {
                  cam.searchAndLock()
                  event.accepted = true
              }
              else if (event.key == Qt.Key_Camera && cam.lockStatus == Camera.Locked) {
                  cam.captureImage()
                  event.accepted = true
              }
          }
      
          Camera {
              id: cam
          }
      }
      

      Run the application on the N8. Press the capture button half-way to trigger camera focus. Wait for focus to be aquired and then finish pressing the capture button all the way through.

      Actual result:
      The built-in camera application is launched.

      Expected result:
      The camera element should capture an image.

      Attachments

        Activity

          People

            tuviitan Tuomas Viitanen
            joe789joe789 Joe
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: