MFC vs Qt (3)

When using a DLL with its own resources, but which uses other DLL, there are
   many chances that the program mixes the resources of the program and the
   DLLs (even with #define to the same values). You must then reserve exclusive
   ranges for the resources, but it is not always possible as you don\'t
   necessary have control on any DLL.


With Qt, there is no concept of resources, which solves all the mentionned
problems. Qt provides a small script to include images into your code. For
interface creation, three is Qt Designer that generates readable code.
Price
Once you have bought Visual Studio, you get MFC SDK for free.
Qt is free in its Unix version (available under GPL) for Free Software. A non
commercial version is available on Windows. But for commercial close source
development, you must pay a Qt license. The license is for one platform (Unix,
MacOs or Windows), per developer. It must be bought once forever for every developer
and a one year support is included. There is no runtime distribution fee. The
price is quite high for a small company: 1550 $ (there are discount for more
than one license). Note that the cost is less than half a month of a
developer. If you compare your development cost with MFC and Qt, Qt will make
you earn far more than half a month in time of development and feature
completeness. The investment is worth it.
Distribution
To distribute your MFC application, you could rely on MFC being present on
Windows. But this is not very safe. Under the same name, MFC42.dll, you can
get three versions of the same library. You usually have to check that the user
has the correct version of MFC42.dll, and else upgrade it. Upgrading MFC
alters the behavious of many applications. This is not something I am
comfortable with. What if the customer PC stops working after installing my
program ?
Qt names its DLL explicitely (qt-mt303.dll) so there is no risk of altering
the behaviour of an application depending on, let\'s say qt-203.dll, when installing
qt-mt303.dll . There is also no "I update your whole system" issue.
Other advantages of Qt
Qt is not only a concurrent of MFC. It is a full toolkit, with many features
available in a simpler way than in MFC, and many that simply have no
equivalent in MFC:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzxwzy.html