Integrating QML and a Map/Location Technology for Windows - c++

I need to display a map containing markers for some devices locations. This application runs on windows (Desktop).
I am trying to find a good technology to display the map, and use coordinates, but I am having no success on finding any.
I've read a bit about QT Location Module and its Map component which seems to be really easy to use, but I couldn't make it work on windows (Compile doesn't find the module). People said this module is for mobile only.
My question is: is there a good api for using map/location with QT, QML into a Desktop application??

Location is going to be integrated in the main release of Qt but it is currently just an Add-on Module (git download url on the fourth row).
Useful information to ease the installation can be found in this thread of the Qt forum.
Finally, I've investigated the problem myself sometime ago and I've found this site full of interesting projects which uses Google API. Each project can be downloaded from GoogleCode. I've not test any of them but they look quite promising and maybe they can satisfy your needs.

Related

It is possible to just use QT and WebAssembly (instead of HTML + CSS + JavaScript) to develop a front-end web?

I am a C++ programmer, but for some reason, I have to develop a website by myself(My own commercial project). I don't want to take a lot of time to study JavaScript and something else. It is possible to just use QT and WebAssembly (instead of HTML + CSS + JavaScript) to develop a front-end web?
Yes, it's absolutely possible and I'm currently doing it for a project but you should do it carefully based on the project requirements, running environment and your own backgrounds.
Here are some problems you may encounter:
The output .wasm file may get too large. Generally, it won't be suitable for public domain applications.
In low-end devices, maybe you find it laggy if you don't do enough code level optimizations.
Threads are not officially supported yet (as of Dec. 2019) by major browsers but tech-preview is available. This is not a real big problem as it would be a standard feature soon.
Native virtual keyboard won't work on mobile devices but the work is in progress.
These were my own major problems with Qt for WebAssembly.
Despite this, I find it much more flexible than HTML+CSS. QML is really a nice language for UI development. Creating animated UIs is quite easy and straight-forward.
You can also use many JavaScript libraries in your QML code like Lodash and Moment or any other js library that does not refer or manipulate window DOM.
Yes, it is possible. But you should do not do it if only reason is reject for learning new technologies.
For now (I'am writing this answer when Qt 5.14 is present) Qt for webassembly is deployed as official platform. Unfortunately it is young platform support with a lot of problems and possible future changes. Qt team do really good job so next version will be better. 5.14 is much better than 5.13 in webassembly context but still need fixes.
You should know Qt for webassembly will support only a few Qt modules, excluding widget. Yes, you can only use QML for GUI.
Qt for webassembly was created for the purpose of port one code base in other platform (it it generally Qt develop way, please see Qt for MCU). With other technologies in this stack like QRemoteObject is very interesting technologies. It was not created for websites in normal network. Main Qt for webassembly target are internal network systems and remote control of devices. Pay attention about this.
Unfortunately, not all browser will support webassembly right. Please see Qt for weassembly support notes.
Additional, in Qt you can't find build-in rest-API handle or other standard web technologies to integrate with your existing backed.

How to port Qt qml to web server with C++ backend

Is it possible to write front-end of my application in QML and back-end in C++ and compile it somehow so that I can deploy it to a web-server like Apache or JBoss so that it is accessible from within a web browser ?
If yes, do you have any examples how to perform this ?
Thank you very much for your answers :)
I was trying to find an answer to my question on the Internet but I was not successful.
QmlWeb is a JavaScript library that is able to parse QML-code and create a website out of it using normal HTML/DOM elements and absolute positions within CSS, translating the QML properties into CSS properties.
QmlWeb is a small project started primarily by Lauri Paimen who developed it for a few years and is now a KDE project maintained by Anton Kreuzkamp.
QmlWeb of course doesn’t yet support everything Qt’s implementation of QML does, but it already supports a quite usable subset of it. It supports nearly all of the most basic QML syntax. Moreover it has support for HTML input elements (Button, TextInput, TextArea are currently supported, more to come).
Well, QmlWeb is not finished. I hope Digia help with this project to make it ready with mature features.
The javascript currently sits on top of v8 but serves the purpose of expressing complex bindings and some (preferably small) client logic. But the engine could change (http://blog.qt.digia.com/blog/2013/04/15/evolution-of-the-qml-engine-part-1/).
Like in a browser, the actual graphics are kind of orthogonal to javascript which can only interact (or instantiate) with already existing graphical objects. In a browser, the graphics are described by html/css/svg/dom, and interpreted by the web engine written in C++. In QtQuick, the graphics are written in Qml and interpreted by the qml engine (scengraph) written in C++.
The two stacks are completely different.
Exception made of the Html canvas and the Qml canvas (which almost share the same api). But those are graphics working in immediate mode (opposed to a SVG or Qml scenegraph, working in a Retained mode fashion).
That being said...
There are 3 attempts to port Qml to the web:
A Qt port to Google Nacl (never heard of it from a long time, most likely dead)
Qt port through Emscripten/asm.js (awesome project, but not viable for production, and I don't think QtQuick is even supported... might require a huge effort to be actively maintained)
QmlWeb (Javascript apis to translate Qml files and interpret those on top of the HTML5 stack). Work in progress and only a subset of the whole QtQuick ecosystem might be supported in the long term. But still a really interesting project and maybe the most promising of all three. At least, it is the youngest one, and it might get some traction from the KDE community. http://akreuzkamp.de/2013/07/10/webapps-written-in-qml-not-far-from-reality-anymore/
You might also be interested in other scenegraphs technologies sitting on top of the web stack (amino, cake.js, rapahel.js...).
Last but not least, you might be interested by Wt (http://www.webtoolkit.eu/wt).
No. You cannot compile QML, and in any form it cannot be deployed onto a Java Application server such as JBoss. Qml is strictly for creating applications to run on a local machine. It sounds like you want to build a Web Application out of HTML with some sort of backend like .Net.

Using c++ how to show overlay icon in finder mac osx

Recently we developed a MAC installer(.dmg). This is developed in c++ and QT. We had a hard requirement to show overlay icons on the files in the finder like how CVS/Dropbox shows sync status on files.
My question is exactly similar to below post. I understand that, if we try to show overlay icons in finder, MAC app store doesn't allow my app to be there. I am fine with this, my users will download the app from the website.
How can i add icon overlay in finder?
Am pretty much new to MAC and c++ also, Can you please provide me suggestion or solution in c++ in detailed.
I know this answer is somewhat late, but better than no answer, isn't it?!
Dropbox uses an open source framework called mach_inject. Originally developed by Jonathan Rentzsch, and known as Mach_Star, it allows code injection into applications.
Dropbox use this to inject into the OSX Finder application. If you Google for "Dropbox mach_inject" you'll find various references to this. Although it's not exactly what you want, there's also a project here which also injects into Finder, but to add menu items. You should be able to use that as reference.

Open source c++ program that receives GPS (NMEA) sentences or x,y coordination and play a location on a map

My program reads GPS (NMEA) sentences from the serial port. I want to be able to see the location in those sentences (some of which contain x,y coordinates) in a map.
Is there a library (preferable open source) I can use to to that?
(It would really help me if it will work on both Linux and Windows, but if not, Windows is OK too)
Is the map component for system integration or just for diagnostic purposes? If just for diagnostic purposes, it might be easier to load the points into a web GIS solution such as Google Maps API or Esri's ArcGIS Explorer. ArcGIS Explorer is stand-alone, but Google Maps can be embedded. With Google, you'll have to use JavaScript to design the control.
In the Java world, OpenMap is popular.
If you need an open source C++ library, consider OpenStreetMap. It is a collaborative project that provide users and developers tools for mapping. In particular, checkout the frameworks wiki for a list of widgets and tools to use their framework. I believe they have C++ widgets you can leverage (although I haven't tried it myself).
For OSM, the widget controls for C++ are COSMCtrl (MFC), Marble (Qt), and QMapControl (Qt).
I'm certain there are other open source C++ widgets out there, but I don't have experience with them.
Did you try this :
http://nmea.sourceforge.net/#platforms ?

How can I keep my cross-platform GUI application up to date?

I'm writing a GUI application in C++ using wxWidgets. As I develop this, I would like to roll out updates to my customers in a reasonably light-weight and customer-friendly way.
My first thoughts were the traditional: go check a URL for a version number and if it's different from the current one, tell the user there's a new version to download (maybe present them with a download link).
Is there a more intelligent/customer-friendly way to do this?
See http://winsparkle.org/ (it's Windows-only but for Mac you have the original Sparkle and under Linux you usually rely on the packaging system for the updates instead of doing it yourself).
I found a potential cross-platform solution:
WebUpdate is a complete, open source, cross-platform update solution for any type of application. It provides an easily-integrable, small application which connects to a web server and shows the updated packages to the user (supports multiple packages) and let him download and install them.
Reliable downloads are granted using MD5 checksums. Local updates (for example, updates to be taken from a CD-ROM or any other device) are supported, too. The program is highly configurable using XML and XRC files. For a complete list of the features of WebUpdate, look at the WebUpdate documentation.