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. QtLocation hangs when running osm
Forum Updated to NodeBB v4.3 + New Features

QtLocation hangs when running osm

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 5 Posters 757 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.
  • P Offline
    P Offline
    PiBo
    wrote on last edited by
    #1

    Hi,

    I'm trying to get qtlocation running with the osm provider but for some reason when the application starts up it just hangs. Cannot even close it.

    When I change it to use the "mapboxgl" provider it works fine. I've been using it for many years on ubuntu 20.04 but since I've switched to Ubuntu 22.04 (qt 5.15.3) I'm having issues. Am I missing parameters?

    Any help would be appreciated

    main.qml :

    import QtQuick 2.15
    import QtQuick.Window 2.15
    import QtLocation 5.15
    import QtPositioning 5.15
    
    Window {
        width: 512
              height: 512
              visible: true
    
              Plugin {
                  id: osmPlugin
                  name: "osm"
                  // specify plugin parameters if necessary
                  // PluginParameter {
                  //     name:
                  //     value:
                  // }
              }
    
              Map {
                  anchors.fill: parent
                  plugin: osmPlugin
                  center: QtPositioning.coordinate(59.91, 10.75) // Oslo
                  zoomLevel: 10
              }
    }
    

    main.cpp

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    
    
    int main(int argc, char *argv[])
    {
    #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    #endif
        QGuiApplication app(argc, argv);
    
        QQmlApplicationEngine engine;
        const QUrl url(QStringLiteral("qrc:/main.qml"));
        QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
                         &app, [url](QObject *obj, const QUrl &objUrl) {
            if (!obj && url == objUrl)
                QCoreApplication::exit(-1);
        }, Qt::QueuedConnection);
        engine.load(url);
    
        return app.exec();
    }
    
    1 Reply Last reply
    0
    • P Offline
      P Offline
      PiBo
      wrote on last edited by
      #2

      I also tried to run this example code (example from qt help files) directly from my host machine (not on a virtual machine). Thought it might be a display driver issue. But got the same result. a few tiles would load and then the application stops/hangs

      Then I also tried with qt 5.15.10. same result

      Also noted that it stops as soon as it loads 1 tile. every time you run it again you see an extra tile showing(probably cached tiles).

      screenLocation.jpg

      Any Ideas anybody?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tagiyevv
        wrote on last edited by
        #3

        Hi,
        Did you ever found a way to solve the issue? I has been a few days now, I'm still struggling with it.

        1 Reply Last reply
        0
        • Ketan__Patel__0011K Offline
          Ketan__Patel__0011K Offline
          Ketan__Patel__0011
          wrote on last edited by
          #4

          You can see following videos on youtube About Qt Location And Qt Positioning Application.

          Qt Location And Qt Positioning : https://www.youtube.com/playlist?list=PLh0cogPqXcJOVXsLsEKEFi4CbbBou2neH

          I hope you will get the solution from this video.

          Christian EhrlicherC 1 Reply Last reply
          0
          • Ketan__Patel__0011K Ketan__Patel__0011

            You can see following videos on youtube About Qt Location And Qt Positioning Application.

            Qt Location And Qt Positioning : https://www.youtube.com/playlist?list=PLh0cogPqXcJOVXsLsEKEFi4CbbBou2neH

            I hope you will get the solution from this video.

            Christian EhrlicherC Online
            Christian EhrlicherC Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Ketan__Patel__0011 why do you reply to old threads to advertise your YouTube channel? Please stop.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            Ketan__Patel__0011K 1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              @Ketan__Patel__0011 why do you reply to old threads to advertise your YouTube channel? Please stop.

              Ketan__Patel__0011K Offline
              Ketan__Patel__0011K Offline
              Ketan__Patel__0011
              wrote on last edited by
              #6

              @Christian-Ehrlicher said in QtLocation hangs when running osm:

              threads

              I reply Beacuse thread is currently open.
              and i am not advertise any thing i just share because there is any solution which can help the OP.

              JonBJ 1 Reply Last reply
              0
              • Ketan__Patel__0011K Ketan__Patel__0011

                @Christian-Ehrlicher said in QtLocation hangs when running osm:

                threads

                I reply Beacuse thread is currently open.
                and i am not advertise any thing i just share because there is any solution which can help the OP.

                JonBJ Online
                JonBJ Online
                JonB
                wrote on last edited by JonB
                #7

                @Ketan__Patel__0011
                In general your posts to videos are all just generic ones on a topic, such as QtLocation here. But these threads have some specific question --- here, for example, a "hanging" problem --- which the videos do not address. People thinking the links will help solve the questions should be aware they will not.

                Ketan__Patel__0011K 1 Reply Last reply
                1
                • JonBJ JonB

                  @Ketan__Patel__0011
                  In general your posts to videos are all just generic ones on a topic, such as QtLocation here. But these threads have some specific question --- here, for example, a "hanging" problem --- which the videos do not address. People thinking the links will help solve the questions should be aware they will not.

                  Ketan__Patel__0011K Offline
                  Ketan__Patel__0011K Offline
                  Ketan__Patel__0011
                  wrote on last edited by Ketan__Patel__0011
                  #8

                  @JonB
                  I Got Your Point
                  But i shared this video just beacuse in video they shown same code.
                  so i thought if user see this video and may be it can help to solve the problem.
                  if there is any problem with that video links i can delete that post.

                  JonBJ 1 Reply Last reply
                  0
                  • Ketan__Patel__0011K Ketan__Patel__0011

                    @JonB
                    I Got Your Point
                    But i shared this video just beacuse in video they shown same code.
                    so i thought if user see this video and may be it can help to solve the problem.
                    if there is any problem with that video links i can delete that post.

                    JonBJ Online
                    JonBJ Online
                    JonB
                    wrote on last edited by JonB
                    #9

                    @Ketan__Patel__0011 said in QtLocation hangs when running osm:

                    if there is any problem with that video links i can delete that post.

                    No, that's fine, they serve a purpose, no problem, you are good. Just they do not always tackle the particular issue someone might raise in a thread here.

                    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