[Interest] Role of `qmlscene` and `qml` command line tools

Elvis Stansvik elvstone at gmail.com
Sat May 7 00:10:14 CEST 2016


2016-05-06 23:47 GMT+02:00 Thiago Macieira <thiago.macieira at intel.com>:
> On sexta-feira, 6 de maio de 2016 10:50:45 PDT Shawn Rutledge wrote:
>> > The reason I'm asking is I'm building a QML application for embedded
>> > use. The app is QML only, apart from some calls from QML into Python
>> > using pyotherside [2] when interfacing with the hardware. So in theory
>> > I could launch my app using `qmlscene` or `qml`, which would free me
>> > from having to build and distribute a little C++ launcher application
>> > to launch the app.
>>
>> That’s what the qml tool is intended for.
>
> Except we disclaim any issues with security. The qml tool will load any file or
> URL passed to it, whether it's from a trusted source or not. It may also find
> qmldir files in random places depending on how the tool was launched and where
> from.
>
> You should at least write a shell script that wraps the launching of the tool
> to sanitise arguments and the environment.

Yes, the app will be started from a startup script, or possibly a
systemd unit, under our control (it's an embedded use case).

>
> But if you're going to do that, you may as well just distribute your own .exe.

Hm. Okay. I've just finished removing our C++ snippet just now :p

In our case, we'll have complete control of what gets installed and
when (we'll be the ones doing any software updates, and the machine
will not be connected to the internet when deployed).

But yea, maybe we should keep the little launcher app. From what
you've said, I get the feeling that `qml` is perhaps not so actively
supported.. (which is logical I guess, if it's not used that much).

I just liked the simplicity of not having to have qmake && make as
part of the deployment instructions. Apart from the extra steps, it
requires build tools and dev packages of Qt.

Anyway, thanks for the input. I'll see what I'll do. It's 5 minutes to
add back the launcher.

Elvis

>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list