×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    16

    QT Creator - QT Mobility issues

    Hi

    I downloaded the latest Nokia SDK for QT yesterday - so latest version QT 4.7 etc.

    I'm trying to use the mobility features - for example contacts, which work fine when targeting the Symbian Simulator.

    However, when changing the target to Symbian Device I'm getting IDE warnings:
    For example:
    #include "QContactManager"

    I get a pop up "No Such file or Directory".

    Additionally, the code completing doesn't work for any QContact* classes etc.

    ( Like I said, all is well when targeting the simulator , no IDE warnings, code completion works as expected ).

    Any ideas - thanks!

    Stewart

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: QT Creator - QT Mobility issues

    Have you tried ready examples available in the Qt wiki page.
    Try that.

    In fact, You have to add contcts API in your .pro file.
    as below :

    Code:
    CONFIG += mobility
    MOBILITY = contacts
    Best regards,

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QT Creator - QT Mobility issues

    Check what Rahul proposes and additionally it should be system include
    Code:
    #include <QContactManager>
    In case it doesn't work make a file search in NokiaQtSDK for QContactManager file. You should have three of them, one for every target.

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    Re: QT Creator - QT Mobility issues

    Hello,

    My first try with Qt Mobility from the Nokia Qt SDK 1.0.2 is not successful. My .pro file is here:

    Code:
    #-------------------------------------------------
    #
    # Project created by QtCreator 2010-11-29T17:40:24
    #
    #-------------------------------------------------
    
    QT       += core gui
    
    TARGET = QMobilityTest
    TEMPLATE = app
    
    
    SOURCES += main.cpp\
            mainwindow.cpp
    
    HEADERS  += mainwindow.h
    
    FORMS    += mainwindow.ui
    
    CONFIG += mobility
    MOBILITY += contacts systeminfo
    
    symbian {
        TARGET.UID3 = 0xe59a64c5
        TARGET.CAPABILITY += ReadUserData WriteUserData LocalServices NetworkServices UserEnvironment Location ReadDeviceData
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }
    I work with Qt Creator. The code builds well. It runs well on Maemo and Qt Simulator. But when I try to make target debugging on a N97, the debugger tells me that it can't install from the package C:\Data\QMobilityTest.sis, due to General OS-related error. I have already installed the SIS file of Qt Mobility of the SDK.

    What could be the problem?

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    173

    Re: QT Creator - QT Mobility issues

    How you installed sis files to your phone? Via bluetooth ?
    If yes, then you need to install appTRK on your phone.

    After that put your phone USB Connection mode to "PC Suite mode"
    and then start appTRK with USB mode. Bluetooth mode is not
    working.

  6. #6
    Registered User
    Join Date
    Aug 2009
    Posts
    173

    Re: QT Creator - QT Mobility issues

    From Windows start menu :


  7. #7
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    Re: QT Creator - QT Mobility issues

    USB and appTrk works well with other projects. I installed Qt Mobility with the SIS of the SDK. I reinstalled it with the Symbian menu.

    Here are my codes:

    main.cpp:
    Code:
    #include <QtGui/QApplication>
    #include "mainwindow.h"
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
    #if defined(Q_WS_S60)
        w.showMaximized();
    #else
        w.show();
    #endif
    
        return a.exec();
    }
    mainwindow.h:
    Code:
    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    
    #include <QMainWindow>
    
    namespace Ui {
        class MainWindow;
    }
    
    class MainWindow : public QMainWindow
    {
        Q_OBJECT
    
    public:
        explicit MainWindow(QWidget *parent = 0);
        ~MainWindow();
    
    private:
        Ui::MainWindow *ui;
    };
    
    #endif // MAINWINDOW_H
    mainwindow.cpp:
    Code:
    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <QContactManager>
    #include <QSystemInfo>
    #include <QContact>
    #include <QList>
    
    QTM_USE_NAMESPACE
    
    MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    
        QContactManager cm;
        QList<QContact> allContacts = cm.contacts();
        QString strContactNumber;
        strContactNumber.setNum(allContacts.length());
        ui->iLabelContactNumber->setText(strContactNumber);
    
        QSystemInfo s;
        ui->iLabelCountryCode->setText(s.currentCountryCode());
    }
    
    MainWindow::~MainWindow()
    {
        delete ui;
    }

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    173

    Re: QT Creator - QT Mobility issues

    OK. Here was some thread about 2 weeks ago concerning "contacts".
    Qt Contacs "class" has invalid type on release libraries.

    Try to find that discussion.

  9. #9
    Registered User
    Join Date
    Aug 2009
    Posts
    173

    Re: QT Creator - QT Mobility issues


  10. #10
    Registered User
    Join Date
    Apr 2010
    Posts
    9

    Re: QT Creator - QT Mobility issues

    You are right, teknikko.

    I comment all codes using Qt Contacts, keeping only QSystemInfo API. I reboot the phone, and the program is launched well by Qt creator.

    Then I uncomment Qt Contacts codes. Curiously, now, the debugger does not complain about the installation of the SIS, but it stops at the launch of the app (the UI is not yet displayed), and can't go further. I click on the "Continue F5" button, but the debugger stops immediately. The problem seems to be Qt Contacts class.

    Presently, my aim is only to know how to start using Qt Mobility. Not yet to develop a software. I know now how to set the .pro file and that QTM_USE_NAMESPACE is needed to use Qt Mobility classes.

    Thanks.

  11. #11
    Registered User
    Join Date
    Nov 2010
    Posts
    4

    Re: QT Creator - QT Mobility issues

    I am facing exactly same problem...any luck?

    Regards

    Quote Originally Posted by stewarth01 View Post
    Hi

    I downloaded the latest Nokia SDK for QT yesterday - so latest version QT 4.7 etc.

    I'm trying to use the mobility features - for example contacts, which work fine when targeting the Symbian Simulator.

    However, when changing the target to Symbian Device I'm getting IDE warnings:
    For example:
    #include "QContactManager"

    I get a pop up "No Such file or Directory".

    Additionally, the code completing doesn't work for any QContact* classes etc.

    ( Like I said, all is well when targeting the simulator , no IDE warnings, code completion works as expected ).

    Any ideas - thanks!

    Stewart

  12. #12
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QT Creator - QT Mobility issues

    Search for QContactManager file in SDK directory and provide a result.

  13. #13
    Registered User
    Join Date
    Nov 2010
    Posts
    4

    Re: QT Creator - QT Mobility issues

    I found QContactManager at following locations:

    c:\nokiaqtsdk\simulator\qtmobility\mingw\include\qtcontacts
    c:\nokiaqtsdk\symbian\sdk\epoc32\include\applications


    Quote Originally Posted by divanov View Post
    Search for QContactManager file in SDK directory and provide a result.

  14. #14
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: QT Creator - QT Mobility issues

    This is strange as there should be three: Maemo, Symbian and Qt Simulator. I guess there is something wrong with SDK installation. You may try to reinstall it with offline installer.

  15. #15
    Registered User
    Join Date
    Nov 2010
    Posts
    4

    Re: QT Creator - QT Mobility issues

    Nothing is wrong as I did not install maemo by doing custom installation.
    Update: But I think your suggestion is fine - as I could not find any other solution. I will reinstall with offline installer.
    Quote Originally Posted by divanov View Post
    This is strange as there should be three: Maemo, Symbian and Qt Simulator. I guess there is something wrong with SDK installation. You may try to reinstall it with offline installer.
    Last edited by chetanpan; 2011-02-02 at 04:29.

Similar Threads

  1. Qt Creator code completion not working with Qt Mobility for Symbian
    By ceefour in forum [Archived] Qt Mobility Project
    Replies: 4
    Last Post: 2011-09-10, 05:02
  2. Replies: 21
    Last Post: 2010-11-17, 04:44
  3. 2nd boot on QT Creator fails to find Nokia SDK (or any mobility sdk's)
    By nummesam in forum [Archived] Qt SDKs and Tools
    Replies: 1
    Last Post: 2010-10-02, 10:23
  4. Qt Mobility with Qt Creator - QTSDK-98 doesn't fix it for me
    By pzman in forum [Archived] Qt SDKs and Tools
    Replies: 2
    Last Post: 2010-09-10, 09:52
  5. Replies: 3
    Last Post: 2010-06-30, 01:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×