Project

General

Profile

Hosting Wt app inside desktop Qt exe via QtWebKit

Added by Tony Rietwyk over 12 years ago

Hi Everybody,

I'm trying to do something similar to this enquiry http://redmine.emweb.be/boards/1/topics/1266?r=1295#message-1295. In it Koen says:

Although many people are simply instantiating a browser widget (like Qt's QWebView) to create a desktop app from a Wt application.

Do any of these 'many people' have a link to a blog, or a hello-qwebview example of this?

I have an existing Qt desktop app that also needs to run on iOS and Android. I would like to port the app to Wt which seems far superior to Qt. Ideally the ported desktop version would benefit from having a fresh look consistent with the mobile/ipad versions. I have no experience with cmake or boost!

I've setup wt-3.2.3 on Windows 7 with VS2008 and can run the hello and helloqt examples.

I've also downloaded qt-desktop by Pau Garcia i Quiles from http://gitorious.org/wtdesktop/wtdesktop/archive-tarball/wtdesktop. I can see that src/desktop there has almost exactly what I require, and what Koen suggests, except:

- I can't find a main.c example that calls into src\desktop\DesktopServer.C WRun::run. So I'm not sure how to get the example programs to build using the desktop, instead of wthttpd.

- I can't get cmake to configure qt-desktop. I changed the boost_dir to c:\program files x(86)\boost, and the version to from 1_35 to 1_51, and cmake still fails to find boost. Pau's project is from 2009 - I don't think it's worth trying to get it to build anyway.

- Comparing wtdesktop against wt-3.2.3, I did the following:

Copied folder src\desktop

Changed wt-3.2.3\CMakeLists.txt

    OPTION(CONNECTOR_DESKTOP "Compile in desktop application connector (libwtdesktop) ?" ON)
    SET(EXAMPLES_CONNECTOR wtdesktop CACHE STRING "Connector used for examples")

Changed wt-3.2.3\src\CMakeLists.txt

  SUBDIRS(isapi fcgi http desktop)

CMake stops with message WtDesktop requires the asio library. How do I set the ASIO_FOUND, ASIO_INCLUDE_DIRS and ASIO_DEFINITIONS?

Thanks for your time,

Tony


Replies (1)

RE: Hosting Wt app inside desktop Qt exe via QtWebKit - Added by Koen Deforche over 12 years ago

Hey,

I believe that these days people will be integrating WebKit directly (or some Chromium derivative).

For iOS and Android, you need to work with WebView components (instatiating them from respectively a Java / Objective C application). In the past we have created applications for these devices that simply wrapped a WebView which then did the real work (talking to a local wt httpd or a remote wt httpd).

Until very recently (the 3.3.0 release) Wt did not really have a good native option for mobile browsers (we used JQuery Mobile at the time but it doesn't cooperate well with Wt), but now that we've adopted the Twitter Bootstrap theme, this is already improved and the upcoming Twitter Bootstrap 3 release promises to be mobile-first.

W.r.t. mobile development it's ultimately a compromise to go for a web-based solution versus a true native one, and a much debated compromise. The obvious benefit for a web-based solution is code reuse and thus time and money saved, but if you really want a native experience you will be investing a lot of time also in getting it to look good, perhaps more time than a native application would have taken (that for example talks to a common C/C layer, since C/C is about the only language that is supported by both iOS and Android for non-UI related things).

Regards,

koen

    (1-1/1)