Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Running different piece of code on different platforms like linux ,windows and android
i want to execute a particular piece of code only on windows and some piece of code only on linux(similarly for android ).now my question is is there any macro flags are there to achieve this (or any other method is there also fine)
i want to execute code as below example
Ex : #ifdef linux_Os_platform
#if defined(Q_OS_IOS) //Ios #elif defined(Q_OS_MACOS) //Macos #elif defined(Q_OS_WIN) //Windows #elif defined(Q_OS_ANDROID) //Android #else ..... #endif
for linux any flags exists ??
here, a more refined article than a quick copy&past from my current project :-)
@J-Hilk thanks!!! it solved my issue.
Super please set as Solved :)