hi
how i can get My Current Location Lat, lon whit QTMobility ?
thanks
hi
how i can get My Current Location Lat, lon whit QTMobility ?
thanks
thanks somnathbanik
I can write my code and compile and built it, but it don't work
void MainWindow:n_pushButton_clicked()
{
QGeoPositionInfoSource *source = QGeoPositionInfoSource::createDefaultSource(this);
if (source) {
connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)),
this, SLOT(positionUpdated(QGeoPositionInfo)));
source->startUpdates();
}
}
void MainWindow:ositionUpdated(const QGeoPositionInfo &info)
{
double m_latitude;
QGeoCoordinate coord = info.coordinate();
m_latitude = coord.latitude();
// m_longitude = coord.longitude();
ui->pushButton->setText(QString::number(m_latitude));
}
how can you say it didnt work, did you get any error message.
From you rough code what i can see is you haven't mentioned the PositioningMethod, there is no way to know time out occurred or not.
So the case may be your phone might be a indoor position where it takes some time to get the GPS fix and thus position.
I will advice you to first set PositioningMethod, then set a time out period and check again.
Hi
Can I suggest that you have a look at the bugs raised against the location API's ,
http://lists.qt.nokia.com/pipermail/...il/000996.html
http://bugreports.qt.nokia.com/browse/QTMOBILITY-1501
http://bugreports.qt.nokia.com/browse/QTMOBILITY-1550
I had issues with the Qt location API's and the solution I got from the good folks at the paid support was to write a wrapper to the underlying Symbian c++ API's.
regards
Guus