QtLocation hangs when running osm
-
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(); }
-
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).
Any Ideas anybody?
-
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.
-
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.
@Ketan__Patel__0011 why do you reply to old threads to advertise your YouTube channel? Please stop.
-
@Ketan__Patel__0011 why do you reply to old threads to advertise your YouTube channel? Please stop.
@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. -
@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.@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__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.@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. -
@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.@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.