[Interest] #define in qml
Bo Thorsen
bo at fioniasoftware.dk
Mon Feb 20 08:23:26 CET 2012
Den 19-02-2012 21:00, Thiago Macieira skrev:
> On domingo, 19 de fevereiro de 2012 20.41.56, qtnext wrote:
>> Hi,
>>
>> I wants to start testing my Qml apps (qt4.8, quick 1.1) with Quick2 Qt5
>> ... But how can I easily test it with Qt5 with a working Qt4 source ..
>> Is there any way to define #ifdef QT5 import Quick 2.0 #else import
>> Quick 1.1 ?
>
> That's not how you're supposed to do it.
>
> You're supposed to upgrade to Qt Quick 2.0 when you're ready to upgrade and
> never look back. Then you make sure it looks correct when you do.
Which means it's quite difficult to create add-on products for QML that
supports multiple versions.
I don't know how to solve this, though. Adding a preprocessor over QML
files just feels fundamentally wrong to me, but it might be the only
solution for a QML library vendor.
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Interest
mailing list