In Qt there are defined constants indicating the target platform, for Windows this is Q_OS_WIN.
Look in Qt examples.