+1 for wxWidgets

A simple, unscientific comparison and opinion on Qt vs wxWidgets

I’m not one to care much for front-end programming. Hate is too strong of a word. Dislike is probably the correct degree. I’m a back-end guy. I like the gears and bare metal stuff. I like assembly and low level languages.

So when I can, I pass the front-end work to someone else. They often wrap my code into another language and build something that looks a whole lot better than I would do.

But I have my own projects that need some kind of front-end other than a simple command line interface. So I set out to find a library to help me.

The essence of this project was a simple timer (more like stopwatch) that is to be the only thing displayed on a secondary monitor.

The machine doesn’t have a lot of power, and will be busy doing more important tasks, so the memory and CPU usage must be minimal. That takes Java out of the running.

It must be cross platform, so that gets rid of C# and the other platform specific languages. Yes, I know C# is somewhat cross-platform nowadays. But I don’t want to bloat someone’s Mac or Linux box with a ton of unwanted stuff.

I am a C++ guy. And while I don’t always get the choice, I use it where I can when it makes sense. In this project, it made sense if I could find a way to make the UI cross-platform. Everybody points you to one of two camps. Qt or wxWidgets.

Being that I will own the source, and I don’t mind sharing, the licensing differences didn’t matter much to me. Qt won the Googling war. It seemed that most people talked it up higher than wxWidgets. So I took a stab, and downloaded their libraries and Qt Creator.

I built the app. As it turns out, one of their examples gave me a great springboard for what I wanted to do. When it was near complete, I was pleased.

So why not take a look at wxWidgets? With Qt fresh in my mind, it would be great to give it a shot and do a sort of apples to apples comparison. I downloaded the library, and learned how to wire it in to xcode. That wasn’t too hard. I threw together a wxWidgets Hello World, and it worked. That’s nice. No big download. I can use a familiar IDE. Those are big plusses to me. That means the library is better at standing on its own.

But the big win for me was that the final source code of the wxWidgets version of my stopwatch/timer had a sensible code structure and hardly any macros or typedefs within it. The event mechanisms were a good take on the way it is done in Visual C++, and were therefore familiar to me.

So in my book, wxWidgets won. Qt was removed from my development machine to regain the disk space.

Did I hate Qt? No. It worked well, and Qt Creator wasn’t bad. The online community is strong, and I did not find any area where I could not find an answer to my question.

Is wxWidgets perfect? No. I did not feel that the community was as large as Qt. And I ran into a few documentation glitches. And while I wouldn’t fret about taking on a project that was tied to Qt, I’ll be using wxWidgets on my own C++ front-end projects for the time being.

As always, YMMV.