views:

1468

answers:

4

I have a large GUI project that I'd like to port to Linux. What is the best framework to use for GUI programming in Linux? Should KDE / Gnome frameworks be used? Or can I use something more generic other than X?

I feel like if I chose one of Gnome or KDE, I'm closing the market out for a chunk of the Linux market who have chosen one over the other. (Yes I know there is overlap)

Is there a better way? Or would I have to create 2 complete GUI apps to have near 100% coverage?

I do not need a cross platform solution that will work on Win32.

+4  A: 

Gnome apps work on KDE desktops and vice versa; you won't be locking anyone out. As far as toolkits go, it's fairly subjective. All of the toolkits are fairly cross-platform. If you're not open source, then GTK+ would be the cheaper option, as Qt is only free for open source use, whereas GTK+ is LGPL.

Bernard
Update: nowadays also Qt is LGPL: http://www.qtsoftware.com/about/licensing/frequently-asked-questions
Jonik
Indeed. It is a great improvement over the previous situation.
Bernard
+10  A: 

Your best bet may be to port it to a cross-platform widget library such as wxWidgets, which would give you portability to any platform wxWidgets supports.

It's also important to make the distinction between Gnome libraries and GTK, and likewise KDE libraries and Qt. If you write the code to use GTK or Qt, it should work fine for users of any desktop environment, including less popular ones like XFCE. If you use other Gnome or KDE-specific libraries to do non-widget-related tasks, your app would be less portable between desktop environments.

Zack Elan
CyberED
2 years on, I'm faced with the same problem as the OP; this is the first reasonably clear answer I read. Has anything changed in the meantime?
slashmais
A: 

Have you thought of using Mono? Programs like Paint.NET work great under Linux & Windows.

Mike Thompson
+3  A: 

I recommend wxWidgets or Qt. They are both mature, well-structured and cross-platform, with decent documentation and sample source code.

Anders Sandvig