[Interest] QML Runtime
Bo Thorsen
bo at fioniasoftware.dk
Wed Jan 30 13:01:06 CET 2013
Den 30-01-2013 11:24, Rutledge Shawn skrev:
> On 30 Jan 2013, at 10:24 AM, Mark Summerfield wrote:
>
>> Hi,
>>
>> I noticed that last month there was a discussion on the dev mailing list
>> about creating a qml runtime so that people could write pure QML
>> programs with #!/usr/bin/qml (or presumably with a file association on
>> Windows).
>>
>> I just wondered:
>>
>> - Is this likely to happen?
> The patch is here
>
> https://codereview.qt-project.org/#change,43540
>
> so you can test it and see whether it works well enough for you.
This seems a bit silly. I don't remember ever seeing a single file QML
application that wasn't totally trivial. You need more than one file.
If you make this able to unpack a zip (or something else) archive in
memory and run the files in it, it might be useful.
Same conclusion the java people came to with the jar files.
Ah, of course, if the files are in a directory, then you have access to
other files as well. Hmm, that might make sense. But if you added an
archive version, you have something that's deployable on many platforms
without platform run scripts.
>> - How would it cope with qsTr()?
>>
>> - Would this mean that QML would be able to access all or most of the Qt
>> C++ APIs (e.g., QFile, etc.)?
> No, adding new QtQuick APIs is still more work that needs to be done.
That's a decision I've seen debated a few times here. On one hand, QML
feels like a limited tool if you don't have access to the full Qt API or
at least a much larger subset of it. OTOH, ATM all non-trivial QML apps
need a C++ side anyway, so why not let people code the C++ instead of
trying to wrap everything.
The javascript side also has a lot of limitations. Especially because
there is no available framework to do real work. JS is pretty much
restricted to manipulate the QML objects.
As the situation is right now, I don't see the point in making it
possible to run a QML only app. The environment is too weak for this to
make sense. Sure, there are probably a few apps you can do. But the
overwhelming amount of QML apps will need C++ coding as well.
Then again, a small tool like the proposed patch is not a bad idea for
examples, tutorials, learning etc.
Bo Thorsen.
--
Fionia Software - Qt experts for hire.
More information about the Interest
mailing list