Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gui toolkits, which should I use? [closed]

I am writing a fairly large and complex data analysis program and I have reached the point where I think it is about time to build a GUI for the program. So my question is:

Which GUI toolkit should I use?

I am completely new to coding and building GUIs and would appreciate any guidance that can be offered. It doesn't have to be the simplest tool kit in the world, I learn rather fast. However, it does need to be able to do the following things (some if not all of these are probably incredibly basic for any given toolkit but I thought that it would be good to throw all this out there just in case).

It has to allow me to draw directly to the screen so that I can put graphs (spectra really), plots and things like them up for the user to see. I need to be able to collect position information on where they clicked on aforementioned spectra. I need to be able to display text and take text input from the user. It needs to be able to generate menus (you know File, Edit, etc). If it were to have some built in widget for generating tables that would be handy (though I can surmount a lack of that if I can draw directly to the screen). It needs to be able to pop up warnings, dialogue boxes, save and open boxes, etc. That is pretty much it, most of these seem pretty basic when I write them out but I don't want to get the GUI partly coded and then realize that I I need to rewrite it with a different toolkit.

It should be noted that I have written this program in C++ and that I don't want to have to write the GUI part in C or something else so the toolkit needs to support C++.

Additionally a cross platform toolkit would be preferable over a single platform toolkit. However if it must be a single platform toolkit then I would prefer it be for Linux.

Finally, I would DRAMATICALLY prefer an open source toolkit to a closed source toolkit.

Beyond that I cannot think of anything to add. Thank you in advance for your time and answers.

Hmmm based on the answers I shall look at both Qt and wxWidgets and see which appeals to me more. I with I could accept multiple answers as accepted but I can't, and since I am looking at two things it would be unfair to only accept one of the answers, perhaps in a week or two then I have looked at the toolkits and figured out which I want to use.

like image 490
James Matta Avatar asked Feb 25 '09 04:02

James Matta


People also ask

Which platform is best for GUI?

1–PyQt5. PyQt5 is a very well-known GUI framework used by both Python coders and UI designers. One of its components, the PyQt package, is built around the Qt framework, which is a leading cross-platform GUI design tool for just about any kind of application.

How do GUI toolkits work?

A GUI framework like Qt generally works by taking the existing OS's primitive objects (windows, fonts, bitmaps, etc), wrapping them in more platform-neutral and less clunky classes/structures/handles, and giving you the functionality you'll need to manipulate them.

Which is better QT or GTK?

After a rewrite, the toolkit became GTK+ and saw release in 1998. Unlike Qt, people had the freedom to edit, modify, and share GTK+ from the beginning. While Qt is in some ways a more versatile and adaptable toolkit, a community consolidated around GTK+ during these early years.


3 Answers

For C++, in my opinion, Qt is the least frustrating and most fully featured toolkit. Its also fully cross platform. Note that Qt will be LGPL licensed some time in March 2009, when version 4.5 becomes available. Currently, its only offered in a GPL and commercial license version.

Qt's GUI designer is good. It has lots of utility functions (scene graph library, translation support, built-in Javascript engine, built-in WebKit library). Via the MOC (a special pre-compiler) it also brings a few run-time binding capabilities and introspection to C++.

For your technical application, you might find that Qwt (http://qwt.sourceforge.net/) provides what you need. It is built upon Qt.

Qt can even be used "headless" if you want its utility support (such as networking, etc) without a GUI.

The other cross platform C++ option is wxWidgets, which is usable but not really comparable to Qt. Its a much lower level toolkit, and isn't as easy to use or fully rounded. Gtkmm is another option, in the spirit of GTK+.

like image 122
Yann Ramin Avatar answered Oct 16 '22 06:10

Yann Ramin


Try WxWidgets. Cross platform (compile on Linux, Mac OS X, and Windows) and widely accepted.

http://www.wxwidgets.org/

Open Source too!

like image 35
Zoasterboy Avatar answered Oct 16 '22 08:10

Zoasterboy


I see nobody commented on GTKmm. It is the C++ incarnation of GTK+, and it is a real pleasure to use. I have also used Qt, but I don't like the messy signal/connect code, the moc_XXX generated files, etc. GTKmm has signals and such, but not that preprocessing step, as well as almost all of the Qt toolkit can offer in the graphics arena.

like image 24
Diego Sevilla Avatar answered Oct 16 '22 06:10

Diego Sevilla