#ifdef 支持Mac #ifndef 支持Windows #if defined (Q_OS_WIN) 应该可以再两个系统通用

//mac qt可以运行
#ifdef Q_OS_MAC
    qDebug()<<QSysInfo::MacintoshVersion;
#endif

//Mac不运行
#ifndef Q_OS_MAC
   qDebug()<<QSysInfo::MacintoshVersion;
#endif

//Windows qt会运行
#ifndef Q_WS_WIN
#endif
//Windows  qt不会运行
#ifndef Q_WS_WIN
#endif

#if defined (Q_OS_WIN) 应该可以再两个系统通用

posted @ 2014-12-04 15:33  正定聚  阅读(2944)  评论(0编辑  收藏  举报