I don't like the idea of conditional compilation (and I sense the Qt devs don't either) but there are times when it is justified and others where it's required. See http://doc.qt.nokia.com/4.7/qtglobal.html for a list of available predefined Q_OS_*
macros.