Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrating Qt into legacy MFC applications

Tags:

c++

qt

mfc

We currently maintain a suit of MFC applications that are fairly well designed, however the user interface is beginning to look tired and a lot of the code is in need quite a bit of refactoring to tidy up some duplication and/or performance problems. We make use of quite a few custom controls that handle all their own drawing (all written using MFC).

Recently I've been doing more research into Qt and the benefits it provides (cross-platform and supports what you might call a more "professional" looking framework for UI development).

My question is - what would be the best approach to perhaps moving to the Qt framework? Does Qt play nice with MFC? Would it be better to start porting some of our custom controls to Qt and gradually integrate more and more into our existing MFC apps? (is this possible?).

Any advice or previous experience is appreciated.

like image 597
Alan Avatar asked Aug 26 '08 09:08

Alan


2 Answers

In my company, we are currently using Qt and are very happy with it.

I personnally never had to move a MFC-app into using the Qt framework, but here is something which might be of some interest for you :

Qt/MFC Migration Framework

Qt/MFC Migration Framework

It's part of Qt-Solutions, so this means you'll have to buy a Qt license along with a Qt-Solutions license. (edit: not any more)

I hope this helps !

like image 53
Jérôme Avatar answered Nov 18 '22 19:11

Jérôme


(This doesn't really answer your specific questions but...) I haven't personally used Qt, but it's not free for commercial Windows development.

Have you looked at wxWindows which is free? Nice article here. Just as an aside, if you wanted a single code base for all platforms, then you may have to migrate away from MFC - I am pretty sure (someone will correct if wrong) that MFC only targets Windows.

One other option would be to look at the Feature Pack update to MFC in SP1 of VS2008 - it includes access to new controls, including the Office style ribbon controls.

like image 26
JamesSugrue Avatar answered Nov 18 '22 19:11

JamesSugrue