[Solved] Including Demo Browser into own GUI / Demoapp
-
[quote author="McLion" date="1349715693"]
How do I best include this to start the browser from a Button in my GUI and returning to my GUI when the browser is closed?
[/quote]In my opinion you should consider the option to embed a "QWebView":http://qt-project.org/doc/qt-4.8/qwebview.html at your application. Check out "this simple example to learn how to embed a webview and to open a web page":http://qt-project.org/wiki/Open_Web_Page_in_QWebView.
-
Thank you guys.
@guziemic
Plain Qt (Widget in Designer) because I am currently bound to 4.6.3 on embLinux which does not feature most of the QML stuff ... too bad.@leon.anavi
Your're probably right, for the final product for which I will do it this way to be able to design all the features like I want to have.
However, I need to have demo version right now (like in immediately) which simply has to show that browsing to some predefined bookmarks is possible.
Since I am unexperienced in Qt I feel like the fastest way is to simply include the finished browser. -
[quote author="McLion" date="1349765748"]Since I am unexperienced in Qt I feel like the fastest way is to simply include the finished browser.
[/quote]OK, check the documentation "QDesktopServices":http://qt-project.org/doc/qt-4.8/QDesktopServices.html You can open an external browser using "openUrl":http://qt-project.org/doc/qt-4.8/qdesktopservices.html#openUrl
-
If you do not want to include QWebView you could also with use of "QProcess":http://doc.qt.digia.com/qt/qprocess.html#start start another application (Browser).
-
-
Yes, you can have information about PID.
For instance you you start process as "detached process":http://doc.qt.digia.com/qt/qprocess.html#startDetached then you will have it from method arguments.
But in case of some problems in GUI, stand alone process will remain.
In case of just simple start all processes are connected and exception in one -> causes killing whole application. But to have PID - probably you can use "QProcess:pid()":http://doc.qt.digia.com/qt/qprocess.html#pid
Actually I was using approach with startDetached to run several application from my main GUI application.
-
OK .. testing
Could somebody tell me what is wrong with:
@process.startDetached("browser","-qws -display directfb --dfb:mode=1280x800","/opt/bin/", browserPID);@
Compiler tells me: no matching function for call to 'QProcess::startDetached(const char [8], const char [43], const char [10], Q_PID&)'