[Qt-qml] Detecting platform in QML

jens.bache-wiig at nokia.com jens.bache-wiig at nokia.com
Thu Jun 23 13:10:07 CEST 2011


Not a silly question but I am afraid the answer is currently no. The QML language itself doest not provide you this functionality but it is possible to write a plugin in C++ that can provide it for you.

Alternatively the Qt Quick desktop components provide a QStyleItem that can give you the currently running desktop style as a property. (as in "windows", "mac", "gtk", "oxygen")

http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/

Regards,
Jens Bache-Wiig

Hi,

Probably a silly question, but is it possible to detect the current platform from qml? E.g. Windows, Unix or Mac.

 -Pelle
<ATT00001..txt>

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


More information about the Qt-qml mailing list