tags:

views:

483

answers:

4

Hi

Currently our all GUI component are written in MFC, Out build environment is :

VC 6

Windows XP

I have no idea about :

1) If we can replace all MFC components with QT, without changing build environment ?

2) Will Qt work with VC6 as any other library ?

You answers will help me in getting started, In mean time i have installed Qt4 and trying to build some samples.

Thanks in advance

+2  A: 

You probably shouldn’t use VC6 with Qt 4.5. (see doc)

Apart from that: If your project compiles with Qt, you can easily* switch to Qt components. Qt uses its own componentens anyway, so there’s no other dependencies involved.

However, to set up the Qt environment, you might need to do a few changes to your build system, unless you’re not working with QObjects. (Think of the moc pre-processor.)

*: easily in the sense of being able to start using Qt components. The amount of work needed to actually migrate MFC components to those of Qt is something I don’t know anything about.

Debilski
+3  A: 

Replacing MFC to QT requires a big work to do. First of all you should think whether you need that. Second, Qt could be integrated with Visual Studio.

Kirill V. Lyadvinsky
+5  A: 

1) If we can replace all MFC components with QT, without changing build environment ?

Yes, you even get a MFC/Qt migration framework cf qt.nokia.com/products/appdev/add-on-products/catalog/4/Windows/qtwinmigrate/

2) Will Qt work with VC6 as any other library ?

VC6 is more than 10 years old!

Qt supports VC6 until version 4.5 The next release (4.6) will drop VC6 support cf qt.nokia.com/doc/4.6-snapshot/qt4-6-intro.html#performance-optimizations

tanguy_k
Oops for the VC6 support by Qt, I've confused with win9x support.It's unclear which version of Qt still support VC6. I guess the latest one is Qt-4.4 cf http://doc.trolltech.com/4.4/supported-platforms.htmlQt 4.5 specifically flagged VC6 as unsupported: http://doc.trolltech.com/4.5/supported-platforms.html
tanguy_k
+1  A: 

I learned something very useful when trying to port one client's MFC application to Qt.

I do a lot of refactoring. That doesn't scare me at all. However, I am usually incrementally changing things. That makes a huge difference.

I started porting the MFC application to Qt just after the LGPL version of Qt was released, but before the LGPL release of 'qtwinmigrate' (get it at ftp://ftp.qt.nokia.com/qt/solutions/lgpl/). At the time, I thought Qt was going to hold on to the MFC migration stuff as an incentive for the commercial license.

I had to convert a good number of files before ever being able to compile the project. Once the very basics were up and running, I slowly re-added dialogs until the functionality matched the original version. This was much harder than being able to keep your existing MFC app running as is and slowly replacing dialogs.

So, the point is... USE QTWINMIGRATE!

Oh yeah... and don't use VC6. Upgrade to something more recent.

darron