[Interest] #define in qml

Thiago Macieira thiago at kde.org
Tue Feb 21 19:06:42 CET 2012


On terça-feira, 21 de fevereiro de 2012 16.55.02, henry.haverinen at nokia.com 
wrote:
> Another common case for #ifdefs is configuration management in
> cross-platform projects.
> It's not always possible to port a project to a new platform and never
> look back. :-)

That's not how you're supposed to solve this problem with QML.

If you need platform-specific functionality or changes, your options are:

 - do it in C++ and leave the QML world unaware of it
 - expose a property from C++ into the QML world and operate on that
 - load different QML sources from the C++ world

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120221/75dbc6e2/attachment.sig>


More information about the Interest mailing list