Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Windows platform plugin with and without DirectWrite options in the same build
stephenju last edited by
Is it possible to have Windows platform plugin with and without DirectWrite in the same build? What I want is a build that produces both the default non-DW version of qwindows.dll and a DW enabled version named, say, qwindows_dw.dll. Our installer will then handle the installation of the correct one according to user's Windows version.
The first part of the question is: Is Windows platform plugin the only part of Qt that is required for DirectWrite support?
The second question is then how do I change the build to produce both versions of the DLL? My current plan is:
- Duplicate the whole platforms/windows directory and name it platforms/windows_dw.
- Change the target to qwindows_dw in platform/windows_dw/windows.pro.
- Add directwrite to QT_CONFIG in platform/windows_dw/windows.pro.
- Add windows_dw to SUBDIRS in platforms.pro
Also. Is there a way to control which platform plugin DLL to load at runtime?
hskoglund last edited by
Hi, re. selecting with platform plugin DLL to load at runtime, try calling
Note: you should do it before plugin loading time, which is in QApplication's constructor (e.g. QApplication a(argc, argv); in your main.cpp)
EDIT: forgot to mention, when loading plugins, the filenames are immaterial, so you have to store your different qwindows.dll flavors in different directories.