[Qt-qml] Detecting platform in QML

Artem Marchenko artem.marchenko at gmail.com
Thu Jun 23 19:03:30 CEST 2011


Hi Pelle

It is unfortunately impossible. However it is pretty easy to add platform detection in just a few lines of C++. If your project is pure qml, you can do it even in the wrapping cpp using e.g. preprocessor macros - http://developer.qt.nokia.com/forums/viewthread/5862/#38285

Best regards,
Artem.

On Jun 23, 2011, at 12:00 PM, Pelle Johnsen wrote:

> Hi,
> 
> Probably a silly question, but is it possible to detect the current platform from qml? E.g. Windows, Unix or Mac.
> 
>  -Pelle
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110623/2104e9d1/attachment.html 


More information about the Qt-qml mailing list