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. Project works with simulator but not with symbian....
Forum Updated to NodeBB v4.3 + New Features

Project works with simulator but not with symbian....

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 3 Posters 2.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.
  • C Offline
    C Offline
    chetanpan
    wrote on last edited by
    #1

    I just reinstalled Nokia Qt SDK. I created a simple project with following pro file and code.

    Curiously, it builds successfully for simulator but does NOT build for symbian. Errors stating that QtContacts\QContact cannot be included. What could be wrong as this is fresh installation? I had to add contacts in MOBILITY manually to make it work for simulator.

    @
    #-------------------------------------------------

    Project created by QtCreator 2011-01-30T09:04:57

    #-------------------------------------------------

    QT += core gui network

    TARGET = Try5
    TEMPLATE = app

    CONFIG += mobility
    MOBILITY = contacts systeminfo

    LIBS += -llibpthread

    SOURCES += main.cpp
    mainwindow.cpp

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui

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

    and code looks like:

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QLabel>
    #include <QtContacts/QContact>
    using namespace QtMobility;

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
    ui->setupUi(this);
    ui->gridLayout->setColumnMinimumWidth(3, 100);
    ui->gridLayout->setRowMinimumHeight(5, 60);
    }

    MainWindow::~MainWindow()
    {
    delete ui;
    }

    void MainWindow::on_pushButton_clicked()
    {
    QContactManager manager;
    foreach (const QContact &contact, manager.contacts()) {
    QLabel * label = new QLabel(contact.displayLabel());
    ui->gridLayout->addWidget(label);
    }
    }
    @

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raja26
      wrote on last edited by
      #2

      Change the Target.Capability to TARGET.CAPABILITY += NetworkServices
      WriteUserData
      ReadUserData
      WriteDeviceData
      ReadDeviceData
      LocalServices
      UserEnvironment

      all these capabilities are not required, but change it as per your needs. For some capabilities, you need to sign the app with you device specific certificate, key pair.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Fuzzbender
        wrote on last edited by
        #3

        Try changing the
        MOBILITY = contacts systeminfo
        to
        MOBILITY += contacts systeminfo

        Also, I think the official guideline is to use macro
        QTM_USE_NAMESPACE instead of "using namespace QtMobility" (it should unfold to be the same).

        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