简体   繁体   中英

gtkmm for desktop application

Is it a good idea to use gtkmm gui toolkit for some desktop client application ?

Is this toolkit stable and is there enough documentation online ?

I used gtkmm to write professional applications and yes you can use it for real world software development.

But I also used C/GTK+ and C++/Qt and my opinion is that using Gtkmm you have the feeling that the original toolkit was meant to be used in C and the porting to C++ is ok but in many cases you feel that C++ features could have been used better.

For Comparison:

If you have to choose between Gtk and Gtkmm go for Gtkmm even though you might find yourself stuck in some not well documented or supported function. Eventually you always manage to find a solution (you can check the source code) and c++ is way better then c.

If you have to choose between Gtkmm and Qt, go for Qt. There is a HUGE gap between the two. Not only in the toolkit itself but in the documentation and all the other classes that you need when writing an application.

I started two month ago with gtkmm. I actually port a tcl/tk application and it feels very hard for my to get the things run. The only useful documentation I found is the https://developer.gnome.org/gtkmm-tutorial/3.4/

But many things described in the manual are not working! I actually run into trouble while overriding signal handlers which should work but didn't. Maybe you will take a look in gtkmm-list@gnome.org to find out what kind of problems yo will maybe run in :-)

The docs derived from the doxygen input seems useless for me, because the functions are mostly not described and the parameter names or often not very clear to me.

In comparison to tcl/tk the interface looks inconsistent. Sometimes a parameter must be provided by a text, sometimes by a pointer and sometimes by the native value itself. Especially the menus are very "mysterious" with the string based configuration. The need of having parameters as text is very unhandy! You have to convert the parameter with ostrstream into a text and parse the parameters sometimes yourself from text to real values.

I decided to give gtk+ a chance is the existence of the c++ interface. I thought it would be helpful to get the errors in compile time and not while running the app like with tcl/tk. But this is not the always true with gtkmm. With gtkmm you are also able to run into run time errors because all string parameters will be parsed during run time! This makes the things error prone!

Maybe I will start again and give Qt a chance. But a first view on it shows, that this seems not really better :-)

Writing a gui application still is a really annoying job!

gtkmm is a official supported binding of GTK (gtk.org/language-bindings.php).

"inkscape" and "ardour" are notable applications written in gtkmm

The bindings that are official GNOME Bindings follow the GNOME release schedule which guarantees API stability and time-based releases.

If you want to write your Application in C, go with GTK+ (and the GLib).

You can find a link to the documentation at http://www.gtkmm.org/ ( https://developer.gnome.org/gtkmm-tutorial/ ).

With Glade (and ie. PyGTK) you could rapid prototype your application. Building a GUI with Glade is easy and the resulting UI is a xml file, that is not bound to a programming language.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM