[solved]QGraphicsGeoMap on Symbian^1
-
I'm trying out QtMobility with the new QtSDK 1.1 and I ran into a problem with QGraphicsGeoMap. I'm trying to build simple test for the N97. The application only creates a window with a map view in it. The application starts fine and asks to connect to WLAN and if I allow it the app crashes. (If I don't allow access to web the application doesn't crash.. but I don't get any maps either..)
Here's the code from my mainwindow.cpp@QGeoServiceProvider *serviceProvider = new QGeoServiceProvider("nokia");
QGeoMappingManager *mappingManager = serviceProvider->mappingManager();
QGraphicsGeoMap *map = new QGraphicsGeoMap(mappingManager);
QGraphicsView *view = new QGraphicsView(this);
QGraphicsScene *scene = new QGraphicsScene(this);scene->setSceneRect(0, 0, width(), height());
view->setScene(scene);
scene->addItem(map);view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setCentralWidget(view);@These are the lines I've added to my .pro file:
@DEFINES += NETWORKACCESS
CONFIG += mobility
MOBILITY += locationsymbian {
TARGET.CAPABILITY += Location
}@Any ideas? I can't currently debug on device and the code works fine on Maemo..
-
I guess you will need to have capabilities for network access as well. Check out:
http://doc.qt.nokia.com/4.7-snapshot/platform-notes-symbian.html
and did you add the QT network library?
QT += network
-
NetworkServices capability should be automatically added with DEFINES += NETWORKACCESS by the deployment.pri that was added to my project by the SDK.
I tried also adding it myself but it made no difference.
-
As a quick and dirty fix, does adding this to the Symbian section help?
@ TARGET.CAPABILITY = Location
NetworkServices
ReadUserData
WriteUserData
ReadDeviceData
WriteDeviceDataTARGET.EPOCHEAPSIZE = 1048576 67108864 TARGET.EPOCSTACKSIZE = 0xA000@
I'm not sure if all of that is strictly necessary - I'll talk to the people who were involved with getting the examples running on Symbian about that and then I'll look for the right place to document the actually requirements of the plugin.
-
Thanks David!
I used the settings you suggested and it worked. I'm suspecting you need to use ReadDeviceData and/or WriteDeviceData if you want to use the plugin, I haven't done any testing to find out the exact requirements though.