C++ (Qt) if (false) {}#ifdef Q_OS_MAC#ifndef QT_NO_STYLE_MAC else if(qobject_cast<QMacStyle*> (Style)) {.....}#endif #endif #ifdef Q_OS_WIN else if(qobject_cast<QWindowsVistaStyle*>(Style) && QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based) {.....} else if(qobject_cast<QWindowsXPStyle*> (Style) && QSysInfo::WindowsVersion >= QSysInfo::WV_XP && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based) {.....}#endif else if(qobject_cast<QPlastiqueStyle*> (Style)) {.....}#ifndef QT_NO_STYLE_GTK else if(qobject_cast<QGtkStyle*> (Style)) {.....}#endif else if(qobject_cast<QCleanlooksStyle*> (Style)) {.....} else if(qobject_cast<QWindowsStyle*> (Style)) {.....} else if(qobject_cast<QCDEStyle*> (Style)) {.....} else if(qobject_cast<QMotifStyle*> (Style)) {.....}
C++ (Qt)QStyle *QStyleFactory::create(const QString& key){ QStyle *ret = 0;......#ifndef QT_NO_STYLE_MAC if (style.left(9) == QLatin1String("macintosh")) { ret = new QMacStyle;# ifdef Q_WS_MAC if (style == QLatin1String("macintosh")) style += QLatin1String(" (aqua)");# endif } else#endif...... return ret;}