Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transition from MFC to QT

Tags:

c++

qt

qt4

Currently all our GUI components are written in MFC. Our build environment is:

VC 6

Windows XP

I have no idea whether:

1) We can replace all MFC components with Qt, without changing build environment ?

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

You answers will help me in getting started, In the mean time I have installed Qt 4 and am trying to build some samples.

like image 809
Satbir Avatar asked Dec 23 '22 08:12

Satbir


2 Answers

  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/

  1. 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

like image 121
tanguy_k Avatar answered Dec 28 '22 09:12

tanguy_k


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.

like image 25
Debilski Avatar answered Dec 28 '22 09:12

Debilski