Does QT have any way of "knowing" which plataform is being used?
Unsolved
Mobile and Embedded
-
Hi, I'm doing a project that works on both desktop and mobile, the problem is... How can I tell QT that the project is running on desktop or mobile? The screen design is different between desktop and mobile, and, as we know, the size / resolution between a pc and a mobile phone can be very different, making automatic resizing very difficult. So is there any way for QT to know when it's mobile or desktop?
-
Hi
Since the exe of a Desktop will be different than the exe for a phone then normally one uses
#ifdef Q_OS_ANDROID
...code..
#endifQ_OS_LINUX
Q_OS_WIN64
Q_OS_IOSetc to have platform dependant code so it's only compiled in when app is compiled for that platform.
full list here
https://doc.qt.io/qt-5/qtglobal.html