How it works…
In the script, you can see that the click event of the push button with the objectName property pushButtonShowMap is connected to the dispSite () method. This means that, whenever the push button is clicked, the dispSite() method will be invoked. In the dispSite () method, you access the longitude and latitude entered by the user through the two Line Edit widgets, and assign them to two variables, lng and lat, respectively. Thereafter, you create a URL that invokes Google Maps from google.com and passes the latitude and longitude values entered by the user. The URL is initially in text form and is typecast to a QUrl instance and passed to the widget that is promoted to QWebEngineView to display the website. The QUrl is a class ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access