Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. OpenStreetMaps with QtWidgets/C++
Forum Updated to NodeBB v4.3 + New Features

OpenStreetMaps with QtWidgets/C++

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.5k Views 2 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.
  • MuratUrsavasM Offline
    MuratUrsavasM Offline
    MuratUrsavas
    wrote on last edited by
    #1

    Hi,

    I'm trying to implement a simple way to get position information via visual maps from OpenStreetMaps. Extensive search has shown me that it is not possible to do it with QtWidgets and C++. Every example I've found shows the way as QML and osm plugin. And also this page says that it is not possible to use C++ as of now.

    Is this correct?

    If so, is it possible to insert a QML page (or widget?) into a Qt Widgets application? Or do I have to convert the project to QML somehow?

    Thanks in advance. Any help is highly appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      QQuickWidget comes to mind from your description.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • MuratUrsavasM Offline
        MuratUrsavasM Offline
        MuratUrsavas
        wrote on last edited by
        #3

        Thank you SGaist,

        I guess this would be the easiest way to do it. I'd have to write some QML code after a while.

        1 Reply Last reply
        0
        • MuratUrsavasM Offline
          MuratUrsavasM Offline
          MuratUrsavas
          wrote on last edited by MuratUrsavas
          #4

          Hi,

          I've applied a simple example into my project and can see the QQuickWidget inside of my QDialog window. But somehow the tiles are not loaded properly. I'm getting errors like these;

          qt.network.ssl: QSslSocket: cannot resolve CRYPTO_num_locks
          qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_id_callback
          qt.network.ssl: QSslSocket: cannot resolve CRYPTO_set_locking_callback
          qt.network.ssl: QSslSocket: cannot resolve ERR_free_strings
          qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_cleanup
          qt.network.ssl: QSslSocket: cannot resolve EVP_CIPHER_CTX_init
          qt.network.ssl: QSslSocket: cannot resolve sk_new_null
          qt.network.ssl: QSslSocket: cannot resolve sk_push
          ...
          

          Clearly the TLS handshake is not working at all.

          I can build and run minimal_map example and able to see the tiles. So it should be something with my project settings or something like that.

          Could it be the QtQuickWidget?

          Regards,

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            It doesn't find the OpenSSL version matching the one used when building Qt. A v1.1 VS v1.0 classic issue. Which version of Qt are you using ?
            On what platform ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • MuratUrsavasM Offline
              MuratUrsavasM Offline
              MuratUrsavas
              wrote on last edited by
              #6

              I'm using 5.12 on Ubuntu 18.10. And after switching to 5.12 in the QML file everything started to work normal. I guess, like you said, the project configuration and qml imports were not matching. Thanks for helping me out.

              Now I'll have to find how I could switch to "cycle" map, download offline tiles and use them and control the map view via C++.

              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