Replace the Q_WS_WIN macro with the Q_OS_WIN one in all the source code because, as they say in https://www.kdab.com/porting-from-qt-4-to-qt-5/:
In Qt 5, the Q_WS_* macros have been removed, so any code wrapped in them will never be compiled. Where appropriate (ie when code being wrapped is operating system specific and not window system specific), such code can and should be ported to the Q_OS_* macros.
Note: In https://doc.qt.io/qt-5/qtglobal.html it's stated what Q_OS_WIN is, but not what Q_WS_WIN is.