How to deal with Qt6 minimum Windows version requirements?
-
Hello,
Qt6 is not compatible with every builds of Windows 10 and 11.
Unfortunately, it can lead to error message when someone starts a program on an incompatible version.
For example, Qt6 rely on the GetSystemMetricsForDpi function from winuser.h which is only available since Windows 10, version 1607. If you start a program with a version below 1607, you get a "The procedure entry point GetSystemMetricsForDpi could not be located in...." message.
We can add a Windows version check in our program installer. But how to deal with the portable version? On a UX point of view, throwing such a hard error message to a user is not good at all. I would love to be able to degrade nicely and show my users a message saying "This program version requires Windows 10 build 1607".
-
@tristanleboss
Hello and welcome.Assuming what you say is correct (I would not know), it's a bit "ugly" but the only way I see to catch inability to load a required DLL which you are already linked against would be to supply a small "wrapper" program which does these checks before invoking your Qt exeutable.