How to add Google Maps in my application in Qt?

前端 未结 6 1390
耶瑟儿~
耶瑟儿~ 2020-12-24 00:18

I am developing an application where I am in need of adding the Google map into our application. I am using Qt with UI design and I am not using QML. Is there any API for Q

6条回答
  •  星月不相逢
    2020-12-24 01:04

        QWebView *webView = new QWebView(parentWidget);
        webView->resize(1000,500);
        webView->move(10,10);
        QString gMapURL = "England"; // this is where you want to point
        gMapURL = "http://maps.google.com.sg/maps?q="+gMapURL+"&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&um=1&ie=UTF-8&hl=en&sa=N&tab=wl";
        webView->setUrl(QUrl(gMapURL));
    

    This is a kind of cheap way of getting google map in Qt. Maybe, there is some smarter way of getting it using Google Maps API Web Services. http://code.google.com/apis/maps/documentation/webservices/index.html

提交回复
热议问题