Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-06-2008, 12:28 PM
|
#1
|
LQ Newbie
Registered: Jul 2008
Location: Russia, Novosibirsk
Distribution: Debian
Posts: 3
Rep:
|
Writing GUI front-ends: what language + what GUI library?
Hello, everyone.
I want to write simple graphical front-ends (I'd rather say, GUI wrappers) for some command-line programs.
What combination of programming/scripting language + GUI library could you recommend?
Necessary:
1. Support for both Linux and Windows without modification of code.
2. Easy call of command-line programs without showing their output to the user but with a possibility of processing the output in the program.
Preferably:
1. Support for MacOS.
2. Simpleness and high speed of development.
3. Good documentation and large enough community.
4. Object-oriented GUI library.
5. Dynamically created GUI (somehow structurally/logically, not by hand).
6. High speed of GUI on PC with slow CPU and primitive video card.
Last edited by pear; 07-07-2008 at 07:59 AM.
|
|
|
07-06-2008, 12:37 PM
|
#2
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
give QT a try.
|
|
|
07-06-2008, 04:00 PM
|
#3
|
Member
Registered: May 2008
Location: UK
Distribution: Slackware,Slamd64
Posts: 81
Rep:
|
The easiest way is python + tk (just import Tkinter and off you go). Tk itself isn't OO but python is so it's easy enough to use it in an OO manner. Even if you decide not to use it for the final app, it's great for prototyping.
If you want to end up with a compiled binary, the standard choices are Qt, as matthewg42 mentioned, and GTK, both of which should work in Windows as well as unix, there isn't a great deal between them from a user's point of view, so it will basically boil down to whether you want to use C++ (Qt) or C (GTK), though there are also C++ bindings for GTK (gtkmm).
There are others of course, such as FLTK, though most distros may not include these by default.
If you want a "native" look, have a look at wxWidgets, which is a platform independent frontend (in C++) to each systems' natvie GUI (defaults to GTK on Linux I believe).
Last edited by smoked kipper; 07-06-2008 at 04:02 PM.
Reason: fix link
|
|
|
07-06-2008, 04:16 PM
|
#4
|
Senior Member
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Rep:
|
Quote:
Originally Posted by pear
Hello, everyone.
I want to write simple graphical front-ends (I'd rather say, GUI wrappers) for some command-line programs.
What combination of programming/scripting language + GUI library could you recommend?
|
If you want compiled language, then I recommend C++/Qt 4 (my favorite GUI library). If you want really good-looking GUI, then (I think) Qt will be best choice.
Alternatives to Qt include wxWidgets, FoxToolkit, FLTK, GTK, but I do not know which of those libraries support MacOS and never used any of those libraries much.
IF you want scripting language, then take a look at python. It should have some built-in (i.e. standard) GUI functionality (see python docs), which should be supported on several platforms and included in standard python distribution. And there are also extensions like wxPython, pyQt, PyGTK, etc.
Last edited by ErV; 07-06-2008 at 04:22 PM.
|
|
|
07-07-2008, 03:41 AM
|
#5
|
Member
Registered: Apr 2007
Location: Perth, WA, Australia
Distribution: Fedora 8, Fedora 10
Posts: 49
Rep:
|
I have found that python + wxPython is really easy to use. There is really good documentation out there for it, and even though I hadn't done any programming in python previously, I was able to pick it up pretty easily just by reading the examples. wxWidgets (wxPython is a wrapper for wxWidgets) has lots of built in widget types, so you really don't need to write all that much code yourself.
|
|
|
07-07-2008, 08:00 AM
|
#6
|
LQ Newbie
Registered: Jul 2008
Location: Russia, Novosibirsk
Distribution: Debian
Posts: 3
Original Poster
Rep:
|
I think I forgot to add one preference to my points: it is desirably that GUI will be created dynamically (somehow structurally/logically, not by hand).
|
|
|
07-07-2008, 08:04 AM
|
#7
|
LQ Newbie
Registered: Jul 2008
Location: Russia, Novosibirsk
Distribution: Debian
Posts: 3
Original Poster
Rep:
|
Thanks for your replies.
I think I'll try tk + Python or Tcl. Do you know if my necessary point 2 (processing of console apps' output) is possible and cross-platform in these languages?
|
|
|
07-07-2008, 08:17 AM
|
#8
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
That shouldn't be a problem with any of the suggestions, AFAIK.
|
|
|
All times are GMT -5. The time now is 10:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|