Live data from Hacker News

Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

qt.io

51–60 of 107 posts

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#51

In my last role we were using QML as a prototyping tool for interfaces, and basically making whole proof-of-concept apps in it. It is immensely powerful once you get the hang of it. Though if anyone is thinking about it, please note that it is not (or wasn't) really a language on its own. It's meant as a UI complement for Qt, and trying to build stuff exclusively in QML is a recipe for tears.

Can you elaborate on “recipe for tears”?

Not OP, but QML is not a great language to put more logic than simple bindings and functions like

    Button {
        text: "Save"
        enabled: textField.text.length > 0 // this is reactive to the value of a TextField
        onClicked: Backend.save()
    }
as soon as you try to for example implement the save method in JS/QML this starts to become very painful as it often ends up with a lot of spaghetti code. The very cool thing with QML is that the save function can be simply implemented in C++ like this.

    Backend::save()
    {
        // call QFile/QNetworkRequest/...
    }
It force the programmer to split their logic from the UI layer which I don't consider a bad thing.

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#52

What is the licensing story for Qt these days, my understanding is some portions are only available under commercial license or the GPL (vs. others also under the LGPL)? https://news.ycombinator.com/item?id=34291701

Everything you need for a traditional desktop app, or hell, a complete desktop environment, is LGPL. GPL parts are more specialty and industry tools (IoT protocols, etc)

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#53

In my last role we were using QML as a prototyping tool for interfaces, and basically making whole proof-of-concept apps in it. It is immensely powerful once you get the hang of it. Though if anyone is thinking about it, please note that it is not (or wasn't) really a language on its own. It's meant as a UI complement for Qt, and trying to build stuff exclusively in QML is a recipe for tears.

Can you elaborate on “recipe for tears”?

The imperative parts of QML is javascript. So lack of type safety in larger apps can start getting really annoying, especially once the code base starts to age and not all corners of the code base gets tested every day.

Other than that, beginners to the codebase tend to break property bindings without realizing. There are a few tools to catch this at runtime, but would be nice to do this at compile time.

Also not all of the "Desktop widgets" were readily available in QML in Qt 5 (not sure what the status in Qt 6), and you tend to roll your own Table Views etc.. and those ones need even more work to work like native widgets, supporting keyboard navigation etc...

Overall Qt5/QML was fun to work with, but I did miss a few bits that were readily available on QWidgets.

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#54
post #44

Earlier quoted context omitted.

Yeah but Qt does a lot more, to match Qt you would need a similar effort. I remember some time ago was a popular article shared here on how hard it is to render text when you need to consider all the languages and all the font types and all the options. So it wold be easy to paint some shapes and some english text in the happy case and it would probably be enough for video games but then you need Widgets that will wo…

The point is if you start with a good foundational layer, then a community can build greater things on top of it. Of course, it will take time and if you're looking for a great library that can do everything out of the box, now , then you should pick Qt, there's no doubt about that.

Communities forming around a project is one of those things people think happens a lot but doesn't.

Even with effort, meaningful communities are the exception (let's say 1 in 1000 projects) rather than the rule.

There is also a significant random luck/etc aspect that people like to pretend doesn't exist (ie people like to pretend that if you do all the right things you will just end up magically with a community around your project 100% of the time)

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#55

What is the licensing story for Qt these days, my understanding is some portions are only available under commercial license or the GPL (vs. others also under the LGPL)? https://news.ycombinator.com/item?id=34291701

For 20 years people have been commenting that Qt doesn't have LGPL license.

This has been false for the past 20 years but people feel the need to write it in a comment any time they read "qt" in a title.

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#56

I'm favorably disposed to QML, but for it to actually replace Qt Widgets it'd have to provide: better out of the box desktop integration, a public C++ API and a better WYSIWYG UI designer.

in which ways is the qml desktop integration lacking?

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#58
post #51

Earlier quoted context omitted.

Can you elaborate on “recipe for tears”?

Not OP, but QML is not a great language to put more logic than simple bindings and functions like Button { text: "Save" enabled: textField.text.length > 0 // this is reactive to the value of a TextField onClicked: Backend.save() } as soon as you try to for example implement the save method in JS/QML this starts to become very painful as it often ends up with a lot of spaghetti code. The very cool thing with QML is th…

It is also possible to have a backend implemented in JS in similar way. Though I personally only have used in intial UI prototype which I latter swapped with Julia backend.

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#59
post #8

Earlier quoted context omitted.

Could you make some actual example? Because I read 3 paragraph and I have no idea what you're talking about.

I've got a potential example; I always wondered how that would be achieved with something like slint or qml: With tools like xournal++ or other things like document processors, you can usually define your own panels, reorganize them, move them around, add icons or separators, etc, and all of that in a drag&drop fashion, live from the program running. I feel like having a (compile-time) declarative description of that…

KDE's System Monitor is written in QML and supports most of this.

Re: Qt 6.6 and 6.7 Make QML Faster Than Ever: A New Benchmark and Analysis

#60

Does anyone else think that QT is mostly overkill and HTML is good enough in most cases?

html doesn't have events that can be connected to actions.

Doesn't resize decently, doesn't respect user's settings.

And a browser is much much slower and bigger than a qt application.

Post reply on HN