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. QtMultimediaKit compatibility with maemo5 pr1.3
Forum Updated to NodeBB v4.3 + New Features

QtMultimediaKit compatibility with maemo5 pr1.3

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.5k 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
    sinjar
    wrote on last edited by
    #1

    Hello I am trying to deploy a simple app on a nokia n900 (freemantle pr1.3) that uses QtMultimediaKit
    main.qml
    @
    import Qt 4.7
    import QtMultimediaKit 1.1

    Rectangle {
    id:cameraui
    width: 1280
    height: 720
    color: "black"
    state: "PhotoCapture"
    PhotoPreview {
    id:photoPreview
    anchors.fill : parent
    onClosed: cameraUI.state = "PhotoCapture"
    focus: visible

                 Keys.onPressed : {
                     //return to capture mode if the shutter button is touched
                     if (event.key == Qt.Key_CameraFocus) {
                         cameraUI.state = "PhotoCapture"
                         event.accepted = true;
                     }
                 }
    }
    
    Camera  {
        id:camera1
        x:0
        y:0
        width: 1280
        height: 720
        focus: visible
        flashMode: camera1.FlashOff
        whiteBalanceMode: Camera.WhiteBalanceAuto
        onImageCaptured: {
            photoPreview.source = preview
            stillControls.previewAvailable = true
            cameraUI.state = "PhotoPreview"
        }
    
    }
    states: [
        State {
            name: "PhotoCapture"
            StateChangeScript   {
                script:  {
                    camera1.visible=true
                    camera1.focus = true
                    photoPreview.visible = false
                }
            }
        },
        State {
            name: "PhotoPreview"
            StateChangeScript   {
                script: {
                    camera1.visible=false
                    photoPreview.visible = true
                    photoPreview.focus = true
                }
            }
        }
    ]
    

    }

    @

    PhotoCapture.qml
    @
    import Qt 4.7
    import QtMultimediaKit 1.2

    Item {
    property alias source : preview.source
    signal closed

     Image {
         id: preview
         anchors.fill : parent
         fillMode: Image.PreserveAspectFit
         smooth: true
     }
    
     MouseArea {
         anchors.fill: parent
         onClicked: {
             parent.closed();
         }
     }
    

    }

    @

    main.cpp
    @#include <QtGui/QApplication>
    #include <QDeclarativeEngine>
    #include "qmlapplicationviewer.h"

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);

    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
    viewer.setMainQmlFile&#40;QLatin1String("qml/xyz/main.qml"&#41;);
    viewer.engine()->addImportPath(QString("/home/opt/qtm12/imports"));
    viewer.showExpanded();
    
    return app.exec();
    

    }
    @

    I get the following error file:///opt/xyz/qml/xyz/main.qml:2:1: module "QtMultimediaKit" is not installed
    import QtMultimediaKit 1.2
    ^
    I have already installed the package libqtm-12 on the device using apt-get
    I also added manually the import path in main.cpp shown above
    Now how do I get the qml QtMultimediaKit to work???
    Please help
    Thanks.

    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