Home > C++, MATLAB, Programming, Qt > Cute stuff

Cute stuff

September 27, 2010 Leave a comment Go to comments

Although most of the programming I do is geared towards the purely numerical end of the spectrum, there are times when I find myself faced with a task that would appear to benefit from having a handy GUI. Often, MATLAB provides me with sufficient tools for this since it comes with a built-in GUI builder that you can use to construct graphical interfaces to your code. However, this suffers from two drawbacks:

1) If MATLAB isn’t great at tackling the underlying problem you want to slap a GUI on, the MATLAB GUI builder probably won’t be a great fit for your needs. For instance, if you’d like to build, say, a graphical application that presents the results of monitoring some simulation that you’re running remotely, MATLAB won’t be a good choice since its networking features are, frankly, terrible.

2) MATLAB’s GUI builder uses Java. Enough said.

Having found myself faced with this kind of problem more times than I care to remember, at one point I decided to do something about it .There are several excellent GUI libraries out there that allow you to build stable and functional graphical interfaces to your code but for me there is one in particular that stands out: Qt. Not only is it a breeze to learn if you’re already familiar with C++, it’s also cross-platform, meaning that running your application on different operating systems is (usually, at least) a case of a simple rebuild. It also allows me to hook into existing C++ code very easily, which is great considering how much of the stuff I’ve got lying around.

If you’re interested in learning a GUI framework for similar reasons to the ones I’ve outlined above, Qt may be a good fit for you. The Qt documentation is great and there are plenty of tutorials online. There’s also a rather good book available on the subject, with a more advanced one due out soon. You can even read up on how to build your Qt applications with Python if that’s more your sort of thing. Indeed, the first of these books has been so useful to me when learning Qt that I’m going to shamelessly steal from it during the next post, where we’ll show just how easy it is to get a Qt application up and running. We’ll also cover one or two of the subtleties you need to take into account if you’re using a new version of Qt since the book deals only with an earlier version of Qt 4.

Categories: C++, MATLAB, Programming, Qt
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s