6

I need to write quickly this application: a simple window that wraps a web browser control, that runs html pages. The Browser UI (e.g. Navigation buttons) should be suppressed.

As a .net developer, I would embed the WebBrowser OCX in a Windows Form. But this has to run on Mac as well!

I found the following cross-platform candidates. Which one would you choose (in terms of simplicity, stableness, community support, etc.):

  1. wxWidgets: http://www.kirix.com/labs/wxwebconnect.html

  2. QT: http://www.youtube.com/watch?v=Ee8eRwjbcFk&feature=related

  3. MONO: http://www.mono-project.com/WebBrowser

franzlorenzon
  • 5,845
  • 6
  • 36
  • 58
Gil
  • 395
  • 4
  • 19
  • Thanks for the responders. I finally use Qt, which has the best looks on both platforms, and comes with LGPL option. – Gil Jun 02 '10 at 13:55

5 Answers5

3

Why not to use embedded Webkit?

Michal Čihař
  • 9,799
  • 6
  • 49
  • 87
  • 1
    WebKit isn't sufficient by itself to build a cross-platform page viewer like this. You still need to generate a window, etc. – Rob Napier Apr 27 '10 at 13:18
1

QtWebkit:

The Qt port of WebKit currently compiles and runs on Linux (including Maemo), Windows, Mac OS X and Symbian.

Click here for build instructions.

A very simple test browser is built along with the port.

karlphillip
  • 92,053
  • 36
  • 243
  • 426
0

Since you have (assumption made from your post) .Net experience I'd go with Mono.

Have you considered Adobe AIR? http://www.adobe.com/products/air/

0

Mono is probably the best choice if you're primarily a .NET developer and don't care very much about making a well-integrated Mac app (one that behaves like a Mac app in all the many ways Mac users expect). Given your problem space, that sounds like where you are. That said, pay special attention to this limitation from the WebBrowser page if it applies to your problem:

The Mono Webbrowser currently lacks support for window.external, the bridge that allows Javascript code embedded in the browser to communicate with the managed world using the ObjectForScripting.

QT is very well established, and a great platform if you want to develop this in C++. Remember that there are licensing fees if this is a commercial app.

I've played a bit with wxWidgets. It's big advantage here is that it's probably going to be the smallest distribution, since you only have to include what you need. If all you need is the web browser, I'd look at this, but in my experience it's hard to make wxWidgets programs look good or act correctly on Mac (or on Windows for that matter).

Rob Napier
  • 286,113
  • 34
  • 456
  • 610
  • 3
    Qt is actually available under the LGPL for a while now, so you don't need to buy a commercial license if you want to keep your code closed. I'd agree that Mono is probably the best choice if you only have experience with .Net and you're not interested in making it look decent. – Kitsune Apr 27 '10 at 13:58
  • 1
    @Kitsune Thanks for the note regarding LGPL. I'm about 18 months out of date. – Rob Napier Apr 27 '10 at 18:17
0

Another option may be to write it as a Java app using the Eclipse Standard Widget Toolkit. This includes a browser control that embeds IE, Safari or Firefox, depending on the current platform, and generally behaves well on OS X.

alexmcchessers
  • 954
  • 1
  • 13
  • 16