Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Maps in QtQuick (Qt 5.3)
Qt 6.11 is out! See what's new in the release blog

Maps in QtQuick (Qt 5.3)

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 2.1k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bejronix
    wrote on last edited by
    #1

    Hi,

    I would like to write QtQuick application that contains among others maps. It is desktop application, it doesn't get location from anywhere, it should draw map on area that I wants, be able to include markers (would be great with custom markers), draw route (lines of many colors) on coordinates that I provide.

    I've written such application in C# already but my goal is to do this in Qt because of beautyness and portability. I used GMap.NET and OpenStreetMaps that looks great for me so if it would be possible to use OSM it would be great.

    Unfortunately I can't find any up-to-date information and sample codes that I download even for older Qt versions are unable to compile.

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

      Hi,
      Did you try a webview with an API like googlemap ?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bejronix
        wrote on last edited by
        #3

        I tried simple use of WebView and nothing except white screen appears.

        @import QtQuick 2.2
        import QtQuick.Window 2.1
        import QtWebKit 3.0

        Window {
        visible: true
        width: 600
        height: 600

        Rectangle {
            anchors.fill: parent
        
            WebView {
                id: webview
                url: "http://qt-project.org"
            }
        }
        

        }@

        I get warning Using Qt Quick code model 1 instead of Qt Quick 2. (M324)

        Such warnings I get during debug:

        QSslSocket: cannot resolve TLSv1_1_client_method
        QSslSocket: cannot resolve TLSv1_2_client_method
        QSslSocket: cannot resolve TLSv1_1_server_method
        QSslSocket: cannot resolve TLSv1_2_server_method
        QSslSocket: cannot resolve SSL_select_next_proto
        QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
        QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
        QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated
        QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated

        When I copy some ssl binaries (libeay32.dll and ssleay32.dll) to .../mingw/bin/ folder these errors dissappears but still screen goes white.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You can remove the Rectangle, and you need to add this to WebView:
          @
          anchors.fill: parent
          @

          (Z(:^

          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