可使用宏判断,例如:

#include <QtGlobal>
...
#ifdef Q_OS_MAC
// mac
#endif

#ifdef Q_OS_LINUX
// linux
#endif

#ifdef Q_OS_WIN32
// win
#endif

#ifdef __arm__
// arm
#endif

 

相关文章:

  • 2022-01-15
  • 2022-01-03
  • 2022-12-23
  • 2021-07-29
  • 2022-01-18
  • 2021-07-02
  • 2021-07-03
  • 2022-01-24
猜你喜欢
  • 2023-01-10
  • 2021-10-15
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-02-26
  • 2021-08-18
相关资源
相似解决方案