Reply
Thread Tools
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#1
This is realy strange.. why wont an application running in fullscreen mode work with locationing?
When I turn off fullscreen it works flawlessly.

Anyone else encountered this?

If an applications starts up without fullscreen mode, locationing works.
If an application enters full screen mode from normal mode ,locationing does not work.
If an application enters full screen mode and then goes to normal mode, locationing does not work.
If an application starts up with fullscreen mode, location does not work.

Fullscreen mode kills it in some way?

Last edited by tmsha; 2010-06-30 at 19:08.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#2
How does it not work? How do you know it doesn't work? What did you expect to happen?
 
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#3
Well, when it does not work I don't get any signal about it being done. And I don't see the location icon blinking in the status bar.

Here is my locationing code, maybe a bit hacky, but it works.. (without fullscreen mode):
Maybe somebody got a simpler code for me to use?
Code:
#include "gps.h"

#include <qgeopositioninfosource.h>
#include <qnmeapositioninfosource.h>
#include <qgeosatelliteinfosource.h>
#include <QTimer>
#include <QDebug>


GPS::GPS(QObject *parent) :
    QObject(parent),
    location(0),
{
}


void GPS::start()
{
    location = QGeoPositionInfoSource::createDefaultSource(this);

    location->setUpdateInterval(5000);


    connect(location, SIGNAL(positionUpdated(QGeoPositionInfo)),
            this, SLOT(positionUpdated(QGeoPositionInfo)));


    location->startUpdates();
}

void GPS::positionUpdated(const QGeoPositionInfo &info)
{


     latitude = info.coordinate().latitude();
     longitude = info.coordinate().longitude();

     emit getOK_GPS();


}

Last edited by tmsha; 2010-06-30 at 20:41.
 
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#4
I just redid the application from scratch, the problem seems to be from where the locationing service is started, if I do it in the constructor of the code it works, if I connect a button to start it, it fails.

Last edited by tmsha; 2010-06-30 at 21:47.
 
Posts: 60 | Thanked: 23 times | Joined on Jan 2010
#5
Here is my code, somebody please take a look at this, I really don't get it. It's so simple... yet..

Try to run it on your N900 and then select Menu->Location->GPS
It does not work..
If you comment out this line:
MainWindow::showFullScreen();
The GPS button will work.

Also try this:
If you uncomment this line in the constructor:
//startGPS();
the locationing works right away, no problems.
(you can see this if you go the the desktop and look at the statusbar or wait for a fix and the menu will change to coordinates)
Attached Files
File Type: zip BV.zip (236.6 KB, 92 views)

Last edited by tmsha; 2010-06-30 at 21:56.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:00.