Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
6 October 2022
Many Windows desktop applications written in C++ rely on MFC for the user interface. Compared to MFC, Qt offers a set of more modern tools to develop GUI applications, such as more intuitive and straightforward API, better integration with modern C++, UI designer and localization tools. Nevertheless, migrating this existing (and usually large) code base takes a lot of time, and limited team resources may lead to delay the transition and, therefore, to take advantage of many of the modern Qt features, especially those related to the UX. In this line, while some Qt’s modules can be integrated seamlessly, others offer more problems. One of the best examples is UI-related modules, that present incompatibilities with the MFC core (for example, QDialog is not modal for the MFC application).
This is the case of capture movement and analysis systems at STT Systems, where some of the core applications have been developed since 1998, intensively using MFC, and in 2014 it started the incorporation of Qt as the main framework.
This session will cover the experience in using Qt in legacy projects (more specifically MFC applications). First, we will focus on how you can integrate new modules made using Qt into the existing MFC workflow, given a few constraints that can be removed once the migration is completed. Regarding the GUI, we will discuss how to mix both MFC and Qt interfaces (Qt Widgets) and how to deal with modal Qt dialogs in the MFC events loop. Finally, some words will be said regarding the opposite direction: using existing MFC modules in a Qt application, limitations and considerations.
All these techniques are widely used in the development of end-user applications at STT Systems, and they will be taken as example to show the different cases exposed and how it was managed to mix MFC and Qt, while moving forward the end goal of having all of the code using Qt.
All QtDevCon22 Videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6h5jKSLw0cEsKficprxd2iX
QtDevCon22 Website:
https://www.qtdevcon.com/
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more