Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Mobility For n900 (maemo)
Qt 6.11 is out! See what's new in the release blog

Qt Mobility For n900 (maemo)

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 5 Posters 4.0k 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.
  • C Offline
    C Offline
    clockstop
    wrote on last edited by
    #1

    Hello all,

    I'm trying to program a video recorder for the nokia n900 phone, however I'm running into some problems. The following code I can get to compile and run on the simulator, but when I switch environments to the maemo device, the libraries Qcamera, and QCameraViewFinder arn't recognized, and I get errors such as "QCamera no such file or directory".

    I'm not sure why this should be happening, as all I'm changing is the build environment (even before I compile, the green underlines to indicate a problem appear for Qcamera and QCameraViewFinder). I would assume then that it's an issue with the build environments linking???

    On another note, I am using QT Mobility 1.1.1, and the phone only supports 1.0.2, but again these problems are appearing even before I compile.

    Here is my code:

    .pro

    @QT += core gui

    TARGET = TestProject
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

    CONFIG += mobility
    MOBILITY += systeminfo
    multimedia

    QT += maemo5

    symbian {
    TARGET.UID3 = 0xec63c307
    # TARGET.CAPABILITY +=
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }

    unix:!symbian {
    maemo5 {
    target.path = /opt/usr/bin
    } else {
    target.path = /usr/local/bin
    }
    INSTALLS += target
    }@

    main:

    @#include <QApplication>
    #include <QLabel>
    #include <QSystemInfo> //(1)
    #include <QVideoWidget>
    #include <Qcamera>
    #include <QtMultimedia/QtMultimedia>
    #include <QCameraViewfinder>
    #include <QVideoWidget>
    #include <mainwindow.h>
    #include <ui_mainwindow.h>
    #include <QMediaRecorder>

    QTM_USE_NAMESPACE //(2)

    int main(int argc, char argv[])
    {
    QApplication app(argc, argv);
    MainWindow mainWindow;
    QCamera
    camera = new QCamera;

    // get a convenience ptr to ui
    Ui::MainWindow* ui = mainWindow.GetUi();
    QWidget* viewFinderWidget = new QWidget(ui->viewFinderDisplay);
    QMediaRecorder* mediaRecorder = new QMediaRecorder(camera,viewFinderWidget);
    
    // set the camera viewfinder to our viewfinder
    QCameraViewfinder* viewFinder = new QCameraViewfinder(viewFinderWidget);
    camera->setViewfinder(viewFinder);
    
    // test label
    QLabel* whatevs = new QLabel(viewFinderWidget);
    whatevs->setText("whatevs");
    
    //camera->setCaptureMode(QCamera::CaptureVideo);
    camera->start();
    mediaRecorder->record();
    
    mainWindow.show();
    return app.exec();
    

    }@

    Any advice would be greatly appreciated as I'm basically pulling my hair out at this point.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kamalakshantv
      wrote on last edited by
      #2

      can you copy paste the console out put. Also which is your existing build environment and SDK version for which it compile properly.

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xizzhu
        wrote on last edited by
        #3

        According to the docs at:
        http://labs.qt.nokia.com/2011/05/04/qt-sdk-1-1-released/

        Only Qt Mobility 1.0.2 is supported on the SDK for Maemo 5, but those camera classes are introduced in 1.1 (if I remember correctly).

        One solution is to use the Scratchbox and install all the needed packages manually.
        Probably you can just install Qt Mobility 1.1.* packages with the SDK using some hacks too??

        My Blog: http://xzis.me/

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fcrochik
          wrote on last edited by
          #4

          We have already on the repositories experimental versions of qt mobility 1.1 and 1.2. Haven't tested them myself but they are there.

          Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

          1 Reply Last reply
          0
          • A Offline
            A Offline
            aksex
            wrote on last edited by
            #5

            I had same problems when trying to use mobility with maemo target. My n900 has the newest mobility packages installed but maemo simulator doesn't know about that I suppose. When I switched target to symbian simulator it compiled.

            1 Reply Last reply
            0
            • F Offline
              F Offline
              fcrochik
              wrote on last edited by
              #6

              It is possible to update the "libraries" on qt creator but it is unsupported and hard to do.
              You best bet is to use a linux box with scratchbox to compile the application.

              Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

              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