Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved]QGraphicsGeoMap on Symbian^1

[solved]QGraphicsGeoMap on Symbian^1

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 3 Posters 2.6k Views
  • 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.
  • D Offline
    D Offline
    durriken
    wrote on last edited by
    #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 += location

    symbian {
    TARGET.CAPABILITY += Location
    }@

    Any ideas? I can't currently debug on device and the code works fine on Maemo..

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tomjanssens
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        durriken
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dalaing
          wrote on last edited by
          #4

          As a quick and dirty fix, does adding this to the Symbian section help?

          @ TARGET.CAPABILITY = Location
          NetworkServices
          ReadUserData
          WriteUserData
          ReadDeviceData
          WriteDeviceData

          TARGET.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.

          David Laing
          Location API team
          Qt Mobility

          1 Reply Last reply
          0
          • D Offline
            D Offline
            durriken
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0

            • Login

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