How to place google maps on qt widget
-
I am programming to show two locations on the map in QT.
I am going to use Qt Kit 5.13.0However, I do not know how to put google map in widget of qt
When I used qt 5.5, I was able to implement it using QWebView (qmake : QT+= webkitwidgets)Qt 5.13.0 can not use QWebView. The message says Unknown module (s) in QT: webkitwidgets. I do not know why
I want to use google maps in qt5.13.0. Can you tell me if there are any available methods or sample programs?
-
@Son-DongSeong said in How to place google maps on qt widget:
Qt 5.13.0 can not use QWebView. The message says Unknown module (s) in QT: webkitwidgets. I do not know why
Because Qt WebKit was deprecated and removed from Qt 5.6.
Qt 5.13 uses Qt WebEngine: https://doc.qt.io/qt-5/qtwebengine-index.html
I want to use google maps in qt5.13.0. Can you tell me if there are any available methods or sample programs?
You can replace
QWebView
withQWebEngineView
.Alternatively, use the Qt Location module: https://doc.qt.io/qt-5/qtlocation-minimal-map-example.html It does not use Google Maps, but you can select a different map provider. Just remember to follow their terms and conditions (for example, OpenStreetMap requires you to set a unique User Agent in your app)
-
Or you can get binaries of latest QtWebKit for Qt 5.13.0 from http://download.qt.io/snapshots/ci/qtwebkit/5.212/1561566461/qtwebkit/
-
This post is deleted!