×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    90

    QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    I install NokiaQtSdk and use some QtMobility functions in my program. It works well, but QtCreator cann't recognize the QtMobility functions, and QtMobility functions have yellow underlines in the 'QtCreator Edit'.
    it looks not comfortable. What can I do to solve the problem. Thank you!

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

    Re: QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    Did you install Nokia Qt SDK Beta or Nokia Qt SDK RC?

  3. #3
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    90

    Re: QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    Nokia Qt SDK RC

  4. #4
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    90

    How to use QtMobility function in the QtCreator like ordinary Qt function?

    How to use QtMobility function in the QtCreator like ordinary Qt function? Thank you~

  5. #5
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    90

    How to use QtMobility in 'QtCreator of the NokiaQtSDK' like ordinary Qt function?

    How to use QtMobility functions in 'QtCreator of the NokiaQtSDK' like ordinary Qt function(QLable, QPushButton...)? The QtCreator can't recognize the QtMobility funcitons and can't support code syntax.
    All the QtMobility functions have yellow underlines which mean there are some errors. However, the code can work well. But it isn't convenient and it looks comfortable. What can i do? Thank you?

  6. #6
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: How to use QtMobility function in the QtCreator like ordinary Qt function?

    Do you have "using namespace QtMobility;" in your source?

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

    Re: QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    Did you include similar settings to your project file?
    Code:
    CONFIG += mobility
    MOBILITY += messaging contacts

  8. #8
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    90

    Re: How to use QtMobility function in the QtCreator like ordinary Qt function?

    yes, like this:
    // QtMobility API headers
    #include <qnetworkconfigmanager.h>
    #include <qnetworksession.h>
    // Use the QtMobility namespace
    QTM_USE_NAMESPACE

  9. #9
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    90

    Re: QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    Yes, I have
    Quote Originally Posted by divanov View Post
    Did you include similar settings to your project file?
    Code:
    CONFIG += mobility
    MOBILITY += messaging contacts

  10. #10
    Super Contributor
    Join Date
    Dec 2005
    Location
    England,UK
    Posts
    1,600

    Re: QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    Quote Originally Posted by qsun06 View Post
    I install Nokia QtSdk and use some QtMobility functions in my program. It works well, but QtCreator can't recognize the QtMobility functions, and QtMobility functions have yellow underlines in the 'QtCreator Edit'.
    it looks not comfortable. What can I do to solve the problem. Thank you!
    Hi,
    Well have you tried loading one of the examples from the Qt Mobility kit.
    In this instance I tried the example lightmaps. from the file menu ->Open file or project -> move to path containing lightmaps.pro click on the Open button in the file selector and the example is ready to be loaded.
    Select click the Qt Simulator and Symbian 5th Edition.
    Click on Sources which show lightmaps .cpp.
    Click on the name lightmaps.cpp and this opens in the main window.
    There is only one yellow line under the "#include "lightmaps.moc" which is because the file does not exist.
    The listed headers are
    #include <QtCore>
    #include <QtGui>
    #include <QtNetwork>

    // QtMobility API headers
    #include <qmobilityglobal.h>
    #include <qgeopositioninfosource.h>
    #include <qgeosatelliteinfosource.h>
    #include <qnmeapositioninfosource.h>
    #include <qgeopositioninfo.h>
    #include <qnetworkconfigmanager.h>
    #include <qnetworksession.h>

    #include "satellitedialog.h"
    #include "connectivityhelper.h"

    // Use the QtMobility namespace
    QTM_USE_NAMESPACE
    Yours headers are :-
    Quote Originally Posted by qsun06 View Post
    yes, like this:
    // QtMobility API headers
    #include <qnetworkconfigmanager.h>
    #include <qnetworksession.h>
    // Use the QtMobility namespace
    QTM_USE_NAMESPACE
    The header listing above does appear to have
    #include <qmobilityglobal.h>

    The only thing that comes to mind is to add the above line. Save the project in another path and then Close all projects and load a "new" project using "Open File or Project" with the .pro from your project from the newly saves project path and see if this works

    Thanks,
    Jim
    Last edited by jimgilmour1; 2010-06-16 at 11:56. Reason: more information

  11. #11
    Registered User
    Join Date
    Dec 2010
    Posts
    2

    Re: QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    I am with problen....
    what was the solution?

  12. #12
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: QtCreator in the NokiaQTSDK cann't recognize the QtMobility functions

    Quote Originally Posted by samukce View Post
    I am with problen....
    what was the solution?
    solution was just install the newest version and it will work out-of-the-Box

Similar Threads

  1. Application @ \NokiaQtSDK\Examples\4.6\opengl Gives Link error
    By jafferss in forum [Archived] Qt SDKs and Tools
    Replies: 6
    Last Post: 2010-06-10, 12:35
  2. NokiaQtSdk Beta 1 + Phonon
    By cristids in forum [Archived] Qt SDKs and Tools
    Replies: 10
    Last Post: 2010-06-07, 17:19
  3. [moved] QtCreator on device debuging
    By BalajiR in forum [Archived] Qt SDKs and Tools
    Replies: 0
    Last Post: 2010-02-17, 11:13

Posting Permissions

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