Hello, I'm currently trying to develop an application that displays map.
I designed the interface with Designer and there was a GraphicsView in it.
It can be compiled and run but simulator shows nothing and exited with code -1073741819
Here is the code
ui->gvMap is GraphicsView widget that I designed with designer in mainwindow.ui.Code:mappingManager = 0; routingManager = 0; searchManager = 0; QGeoServiceProvider serviceProvider("nokia"); if (serviceProvider.error() == QGeoServiceProvider::NoError) { mappingManager = serviceProvider.mappingManager(); routingManager = serviceProvider.routingManager(); searchManager = serviceProvider.searchManager(); } QGraphicsGeoMap *map = new QGraphicsGeoMap(mappingManager); scene = new QGraphicsScene; ui->gvMap->setScene(scene); ui->gvMap->scene()->addItem(map);
The code above is placed in mainwindow.cpp
When I comment this line out, the app can run and no exited with such code but the map will not display.
Please help meCode:ui->gvMap->scene()->addItem(map);![]()




