×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    6

    Post QtMobility Windows

    Hello, I'm trying to get a simple application compiled in windows, using location from QtMobility.

    I have downloaded the location from git and i have written a simple code such as

    ----------gpsTrackerWindow.cpp------------

    #include "GpsTrackerWindow.h"
    #include <QtGui>
    #include <iostream>

    #include <qgeopositioninfosource.h>

    GpsTrackerWindow::GpsTrackerWindow(){

    //gui initialization
    guiInit();

    //
    QGeoPositionInfoSource *source;
    QGeoPositionInfoSource::createDefaultSource(source);
    if (source) {
    connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)),this, SLOT(positionUpdated(QGeoPositionInfo)));
    source->setUpdateInterval(1000);//set update each second
    source->startUpdates();
    }

    }

    void GpsTrackerWindow:ositionUpdated(const QGeoPositionInfo &info){
    //output a message with the info
    }


    void GpsTrackerWindow::guiInit(){
    //gui init things
    }


    ------------- gpsTrackerWindow.h ---------------------------

    #ifndef GPSTRACKERWINDOW_H
    #define GPSTRACKERWINDOW_H

    #include <QtGui/QWidget>

    class QVBoxLayout;
    class QLabel;
    class QGeoPositionInfo;

    class GpsTrackerWindow : public QWidget
    {
    Q_OBJECT
    public:
    GpsTrackerWindow();

    signals:

    public slots:

    protected:

    private slots:
    void guiInit();
    void positionUpdated(const QGeoPositionInfo &info);

    private:
    QLabel *latitude;
    QLabel *longitude;
    QLabel *date;
    QLabel *velocity;
    QLabel *altitude;
    QLabel *bearing;

    QVBoxLayout *mainLayout;
    };

    #endif //GPSTRACKERWINDOW_H

    ------------ gpsTesteFinal.pro ----------------
    # ----------------------------------------------------
    # This file is generated by the Qt Visual Studio Add-in.
    # ------------------------------------------------------

    # This is a reminder that you are using a generated .pro file.
    # Remove it when you are finished editing this file.
    message("You are running qmake on a generated .pro file. This may not work!")

    TEMPLATE=app
    TARGET = gpsTesteFinal

    HEADERS = gpsTrackerWindow.h
    SOURCES = gpsTrackerWindow.cpp \
    main.cpp

    LIBS += -lQtLocation

    DESTDIR = ./Debug
    CONFIG += debug
    DEFINES += UNDER_CE WINCE _WINDOWS _UNICODE _WIN32 QT_NO_PRINTER QT_NO_PRINTDIALOG ARMV4I _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG _WIN32_WCE=0x502
    INCLUDEPATH += ./GeneratedFiles \
    ./GeneratedFiles/Debug \
    . \
    ./../../location

    DEPENDPATH += .
    MOC_DIR += ./GeneratedFiles/debug
    OBJECTS_DIR += debug
    UI_DIR += ./GeneratedFiles
    RCC_DIR += ./GeneratedFiles

    include(./../../common.pri)
    include(gpsTesteFinal.pri)

    My file structure is set as the following:

    workspace
    |
    |_ location
    |
    |_bin
    |_build
    |_examples
    | |
    | |_fetchgooglemaps
    | |_gpsTesteFinal
    | |_(source files: .cpp, .h, .pro, ...)
    |
    |
    |_location
    | |_(location files: .cpp, .h)
    |
    |_common.pri


    when i try to compile it under visual studio, i get the following error:
    .\gpsTrackerWindow.cpp(5) : fatal error C1083: Cannot open include file: 'qgeopositioninfosource.h': No such file or directory

    and i cant understand why. the includepath in the .pro file seems correct to me, so i don't understand why it dosn't reach the file.

    can someone help me?

    all the best

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: QtMobility Windows

    It is true that your project is about location but LBS means locating the user and not locating header files. You should really post your Qt related problems in the Qt forums, even outside Forum Nokia if the issues are not Symbian/mobile specific

    Now, talking about header's location, the path looks good to me but ../../location looks even better. Try that.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. Replies: 15
    Last Post: 2009-02-09, 17:20
  2. Bluesoleil Software
    By kencooper in forum Bluetooth Technology
    Replies: 9
    Last Post: 2008-08-29, 19:46
  3. Infrared socket connection between Symbian device and Windows
    By vespe in forum Symbian Networking & Messaging (Closed)
    Replies: 15
    Last Post: 2003-10-10, 16:50
  4. TCP socket connection between Symbian device and Windows
    By raghucp in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2003-09-15, 10:15

Posting Permissions

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