getting Qt

I’m in the process of transitioning WinFIG from Microsoft Foundation Classes (MFC) to the QT framework. There are various reasons:

  • It has the much nicer programming model
  • MFC seems almost abandoned by MS. There doesn’t seem to be much commitment to continue and really develop MFC now that .NET and C# are Microsofts favorite horses.
  • MFC user interface programming is a pain
  • Qt is platform independent
  • Qt supports anti-aliasing for nicer graphical rendering
  • Qt provides a more comprehensive widget set and it’s easier to create custom widgets.
  • I also hope to get some graphics performance gains possibly trough using the OpenGL paint device as an configuration option.

So far, porting the code has been a fairly smooth process, helped by the fact that the GDI+ API and the QPainter API are very similar. You create pens and brushes and define paths, really not a big difference so far. But there are also a few problems, one of which is something I didn’t really expect, since it’s a feature that is available in GDI+, but missing in Qt’s QPainter class.

It simply doesn’t support to exclude an area from clipping. It’s possible to include, but not to exclude. I wrote a posting in qtcentre.org, but I couldn’t get a solution there. I also talked to someone from Nokia recently at the Linux Day in Berlin, but the answer was that clipping is a thing to avoid and I would better try to do without. Not a very satisfying answer.

It looks like everybody wants to add eye-catching effects and similar stuff that impresses people at presentations, but the “boring” (nevertheless useful) basic features are drifting out of the focus. However, I don’t want to complain too much. Qt is really a great framework and it’s fairly comprehensive for the purpose of developing an application like WinFIG.

This entry was posted in MFC, Qt. Bookmark the permalink.

Leave a Reply

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