Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot open include file: 'QGeoPositionInfoSource': No such file or directory
Forum Updated to NodeBB v4.3 + New Features

Cannot open include file: 'QGeoPositionInfoSource': No such file or directory

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 377 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.
  • E Offline
    E Offline
    ebonnett
    wrote on last edited by ebonnett
    #1

    Hi all,
    I have a simple class I added to get the current lat long. I added the following to my .pro file:

    QT += positioning

    Below is my header file where the error is being received.

    #ifndef GPSCONTROLLER_H
    #define GPSCONTROLLER_H
    
    #include <QObject>
    #include <QGeoPositionInfoSource>
    #include <QGeoPositionInfo>
    
    class GpsController : public QObject
    {
        Q_OBJECT
    
    public:
        GpsController();
        void startGps();
    
    Q_SIGNALS:
        void positionChanged(qreal latitude, qreal longitude);
    
    private slots:
        void positionUpdated(QGeoPositionInfo geoPositionInfo);
    
    private:
        QGeoPositionInfoSource* _positionInfo;
    };
    
    #endif // GPSCONTROLLER_H
    

    Am I missing something? Also, I noticed I do not need the #include <QGeoPositionInfo> and I wonder why but that is secondary to the problem I'm having.

    Thanks!

    1 Reply Last reply
    0
    • E Offline
      E Offline
      ebonnett
      wrote on last edited by
      #2

      All,
      I fixed the issue. I had to run qmake.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved