How to open another application inside a Qt GUI
-
Hello,
I want to make a GUI application that will open Google Earth inside itself when built and run.
What possible method can I apply?
Thank you -
If you want to embed Earth view into your app, take a look at KDE's Marble. Alternatively, you could probably run Google Earth using QAX, but that would work on Windows only.
If you do not need to embed the view, then you can simply execute Google Earth application using QProcess.
-
I would be working in windows.
And if I don't embed it and try running it on another computer, it wouldn't work, right? -
That really depends on how you do it. If you just embed a registered container using QAX* classes, then it can still fail on another computer if Earth is not installed there. So, if you want to be sure that the application is available, you need to force your users to install it together with your application, or bundle the package together with your app (but be careful about licensing!).
-
So, if the other computer has google earth installed, it would work alright?
Even if it has Ubuntu installed? Or any other OS for that matter? -
QAX* set of classes == Qt ActiveX. It works only on Windows. But even there it is not guaranteed to "just work". You need to test yourself ;)
Maybe Google provides some cross-platform library solution that would work on all platforms, I don't know. That is why I have recommended taking a look at Marble: it's Qt-based, powerful and cross-platform.
-
I checked Marble, but the job requires to be done on google earth.
So, I have to find a solution for that only. And since most probably the app has to work in Ubuntu, I can't go for QAx... :/ -
But thanks for your help... :)
-
You are welcome.
There seems to be a JS API for Google Earth: "link":https://developers.google.com/earth/.
-
Thanks again.. ;)
-
Just out of curiosity: Is there any particular technical reason why you can not use Marble? :) Is there any requirement that we - the Marble authors - could provide/implement for you on the Marble side?
-
@tackat
sorry for this late reply..but it was the requirement of the task to do it on google earth specifically :)
so, I can't implement it on Marble. -
Thanks for the reply! :)
-
In the end I had to ditch Qt for this task.. :) the answer was serial library.. :P