[Development] QML and JavaScript extensions

Kuba Ober kuba at mareimbrium.org
Mon Nov 25 22:50:49 CET 2013


On Nov 15, 2013, at 4:58 PM, Richard Moore <rich at kde.org> wrote:

> The idea that QML deprecates ui files is frankly utter rubbish. UI
> files offer many advantages over QML - decent widgets, keyboard
> navigation, stability, faster coding for the common case in non-mobile
> applications (to name just a few of them). There's nothing wrong with
> QML, there's also nothing wrong with UI files, they just serve
> different use cases.

I’ve been using QML to build QWidget-based user interfaces for a few
months now and it’s way easier than dealing with .ui files. The XML in .ui
files is pretty much not human-modifiable without xml-specific tools,
it’s so verbose as to be virtually useless for human consumption. I doubt
you’re dealing with .ui files directly either, you simply use Designer
(stand-alone or as a plugin).

Since you can actually have some code in QML files, like you could have had
in .ui files methinks back in times of Qt 3, I’d actually say that QML files
used for QWidget-based development are not only more powerful than .ui files,
they are also easy for humans to work with.

Yes, Qt doesn’t support it out-of-the-box, but so what. It’s not that hard,
heck, I’d argue it demonstrates that QML is rather flexible and can be adapted
to needs other than Qt Quick-based user interfaces. QBS is another example of
that. I’m also thinking of putting together all of my state machines using QML,
it’s more visually appealing than writing them out in C++.

As far as I’m concerned, .ui files should die a quick and painless death. They
belong to the dustbin of history.

Cheers, Kuba Ober


More information about the Development mailing list