The Qt x-perience (getting old ;-), part I)

Some time ago I think about writting my (short) experience programming GUI with C++/Qt/Qwt. This interesting post by Linus Torvalds blaming C++ motivated me again to do it.
As I wrote in a previous post, last year I began to work in the Structural Mechanics Group of my civil engineers School. My first work was to develop a GUI to use with PULO by PhD Arturo Fontán, an engine used to optimize launched bridges. Trends in previous works in our team aimed to use MS VisualBasic, but I made a report evaluating some free and privative software. I considered some topics:

  • easy integration with PULO (it is written in Fortran)
  • respect toward standards
  • economy
  • cross-platform
  • easy learning
  • mature develop platform
  • community of users
  • maintainable

So I wrote about Java, .net, Qt, GTK+, wxWidgets, GNUstep,Fox Toolkit, and FLTK. And, you guess, Qt was the winner for me.
My next step was learning C++. I previously has written code in C, but never C++. In two weeks I learned C++ and Qt enough to make a simple proof-of-concept. I programmed a very (dirty) simple editor.

I learned a lot with two books: The C++ programming language by Bjarne Stroustrup and C++ GUI Programming with Qt4 by Jasmin Blanchette and  Mark Summerfield.

Then I began the real work. Of course, the final code can be cleaned and optimized, but after six months the main target was reached: to have an interface that easily can be used to introduce an initial design of properties and constructive process of the bridge, and read results from the engine and analyze them.

Splash

I used QtCreator to develop the GUI and Emacs to modify the engine. Both with best control version system ever, git, made my work really, shaming easy.

Initial design input

Initial design input

To develop the postprocess I thought on gnuplot, but finally I used the Qwt library because its good integration with Qt.

Postprocess

Postprocess

And what about C++? Well, Linus has strong reasons to run C++ down, but Linus develop operating systems. I think doing all this work in pure C would be a pain. It’s true if you want to program more confortable, you’ll produce a less optimum code. But it’s true too programming with C++ is far to attract monkey coders that only had in mind the fastest solution.

This entry was posted in Caminos my dear, Free Software. Bookmark the permalink.

One Response to The Qt x-perience (getting old ;-), part I)

  1. Santiago says:

    Great post! Now I am curious too. But first I want to play a little bit with GTK+. The reason is that I would like to develop some GUI for R and Python and you have libraries in both cases. Anyway, thanks for commenting your experience!
    Cheers,
    Santi

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>