×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    Unable to use Qt Mobility Connectivity Classes

    Whenever i add header file of Conectivity( specially buletooth classes), then there is no error on including it. But when i create any of objects of these classes then the following error came.

    error: 'QBluetoothAddress' does not name a type
    on fallowing line
    QBluetoothAddress obj;

    where as #include <QBluetoothAddress> is also there.

    in project file i had also wrote the following code.

    CONFIG += mobility
    MOBILITY += connectivity

    Please help me to sort out this issue.
    Thanks in advance

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,988

    Re: Unable to use Qt Mobility Connectivity Classes

    Are you able to go to the declaration of QBluetoothAddress , when you click on QBluetoothAddress obj;

  3. #3
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    Re: Unable to use Qt Mobility Connectivity Classes

    NO, i cant but when i click on QBluetoothAddress in #include<QBluetoothAddress> then it goes to declaration of QBluetoothAddress.

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,988

    Re: Unable to use Qt Mobility Connectivity Classes

    Can you paste here the header & cpp file of the class in which you are implementing

  5. #5
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    Re: Unable to use Qt Mobility Connectivity Classes

    I am just doing it in main

    #include <QtGui/QApplication>
    #include "qmlapplicationviewer.h"
    #include <QBluetoothAddress>

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

    QBluetoothAddress obj;
    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile(QLatin1String("qml/test123/main.qml"));
    viewer.showExpanded();

    return app.exec();
    }

  6. #6
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,988

    Re: Unable to use Qt Mobility Connectivity Classes

    Ok, just to cross check, what happens if you try to use any other QtMobility class in the main()..

  7. #7
    Registered User
    Join Date
    Aug 2011
    Posts
    8

    Re: Unable to use Qt Mobility Connectivity Classes

    Just insert QTM_USE_NAMESPACE after includes, it is because QtMobility uses it's own namespace usually

  8. #8
    Registered User
    Join Date
    Dec 2011
    Posts
    30

    Re: Unable to use Qt Mobility Connectivity Classes

    Thanx its now working after including this macro

Similar Threads

  1. Unable to use Qt Mobility Connectivity Classes
    By mazeemanwar in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2012-01-09, 09:55
  2. Qt Mobility 1.2 connectivity
    By rupalimk in forum [Archived] Qt Mobility Project
    Replies: 12
    Last Post: 2011-06-06, 14:58
  3. Unable to use QT Mobility 1.2
    By sumit.ece in forum [Archived] Qt Mobility Project
    Replies: 0
    Last Post: 2011-04-21, 07:27
  4. Unable to run Qt Mobility example
    By jainmonali21 in forum [Archived] Qt Mobility Project
    Replies: 15
    Last Post: 2011-01-20, 10:49
  5. Replies: 3
    Last Post: 2010-07-22, 17:11

Posting Permissions

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