views:

113

answers:

5

I am thinking about something that would allow to develop applications independent of the GUI library, but allow Qt and GTK being plugged in as needed.

A: 

Qt is a framework, it uses GTK underneath (at least on Unix).

There was a mobile toolkit that let you write everything in JS but compiled to the native code on each platform. I forget the name but it was a victim of the iPhone lockdown.

Martin Beckett
No, Qt doesn't use GTK underneath, at most it integrates with the GLib main loop.
Matias Valdenegro
You're thinking of Titanium, and no, it doesn't violate the iPhone SDK terms.
derekerdmann
@derekerdmann Titanium was what I was thinking of. I thought it had fallen under the 'no code generators' rule
Martin Beckett
@Martin Beckett I don't know too much about the specifics, but I believe that since it compiles to native code that is then compiled by the native tools, it was ok. Check out their website to be sure.
derekerdmann
A: 

You can try to use wxWidgets but you tend to get "lowest common denominator" if you go that route. Your better bet is to design your software such that you can plug in an implementation of the necessary "views" in the desired toolkit, and keep your core UI toolkit independant.

Obviously this is more work, but if there is a strong business need, then so be it.

Pete
wxWidgets doesn't use Qt, it only uses Gtk.
lunaryorn
A: 

I don't know of any framework doing something like that (I don't know how it could possibly be done without suffering from a heavy "lowest-common-denominator" syndrome), but I do "cross toolkit" development (applications that use more than one GUI toolkit) and I wrote an article about why and how to do it:

http://www.hardcoded.net/articles/cross-toolkit-software.htm

Virgil Dupras
Sometimes "lowest common denominator" isn't so bad. It really depends on the task at hand, but many, many GUIs don't need much more than notebooks, trees, menubars, toolbars and buttons.
Bryan Oakley
If lowest-common-denominator isn't a problem, then any framework can be used, no need for a meta-framework. I think nearly all GUI framework can emulate the look of all others.
Virgil Dupras
A: 

You can try Tk, which supports themes. There is a tile-qt and tile-gtk theme. There is a 2010 Google Summer of Code project to improve these themes. And, of course, when you use Tk you also get support for Windows and OSX out of the box.

Bryan Oakley
+6  A: 

I'd just use Qt. It includes a Gtk-like style, mimics Gtk standard dialogs and even uses Gtk file dialogs if run under Gnome, so basically it integrates itself into Gtk as good as anything (except Gtk of course), or at least it integrates itself better into Gtk than Gtk does into Qt.

lunaryorn