I think the docs are wrong here, Q_OS_WIN already existed in Qt4-times and it always worked for me. Also see https://bugreports.qt-project.org/browse/QTBUG-23120 .