Qt example application for GPS
Unsolved
Mobile and Embedded
-
@tech-hi See examples mentioned here: https://doc.qt.io/qt-5/qtpositioning-index.html
Also, if you want to let others know which Qt version you're using then don't mention Qt version which was used to build QtCreator - it is usually not the same version you're using. -
#include <iostream>
#include <QGeoCoordinate>
using namespace std;int main()
{
QGeoCoordinate qGeoCoord;
cout
<< "Lat.: " << qGeoCoord.latitude() << endl
<< "Long.: " << qGeoCoord.longitude() << endl
<< "Alt.: " << qGeoCoord.altitude() << endl;
return 0;
}This is a simple code which i wrote, but the output is just "-nan"
What more should i add to the code?