News for hackers. Stuff that matters.
Re:Writing a blatant Telegram clone using Qt, QML and Rust. ... by scrivanodev on Tuesday December 16, 2025 @04:13PM (#46294553)
QML is a great language to make GUIs. A few years I tried XAML, and it honestly kind of sucked in comparison (the verbosity alone made it painful to work with). I haven't tried Slint UI, but supposedly their DSL is even better since it fully compiles to native Rust code.
Re:Writing a blatant Telegram clone using Qt, QML and Rust. ... by IshKebab on Tuesday December 16, 2025 @04:37PM (#46294878)
I found QML to be a terrible language for making GUIs. I really tried with it. But it just felt so hacky and unfinished. A couple of examples (from like 10 years ago so forgive me if I got some of the details a bit wrong):

1. Child components can magically refer to variables in their parents. This is basic encapsulation 101. The only other language I know of that allows that is SystemVerilog and that's from an era where people didn't know better (especially hardware guys).

2. You can create custom widgets... but they can't display text! There's a class called something like QmlSceneGraphTextNode that is the way that all the provided widgets display text but it's private. I guess they might have fixed this eventually but it stayed private for the ~5 years I tried to use it. They wanted me to just use Label widgets in QML land which sucks.

It also felt like there was a pretty huge impedance mismatch between QML and C++ due to its use of Javascript. E.g. stuff like using 64-bit integers. That reminds me:

3. It uses Javascript.

4. I never found a good way to use dialogs. They seem to push you towards having all possible dialogs exist all the time and just showing and hiding them, which is kind of crazy.

I don't think the idea of a GUI DSL is fundamentally bad, but QML is certainly a pretty miserable implementation. Hopefully the Slint guys have learned all of these lessons.

Re:Writing a blatant Telegram clone using Qt, QML and Rust. ... by silon42 on Wednesday December 17, 2025 @02:09AM (#46299090)
3 makes me not wanna use Qt anymore.
Re:Writing a blatant Telegram clone using Qt, QML and Rust. ... by ahartmetz on Wednesday December 17, 2025 @03:15AM (#46299455)
It uses JS like the early web did: for little pieces of logic here and there. It isn't based or structured around, and certainly not made of, JS. It's fine. I don't like JS neither, but I do like QML.

Also, feel free to use QtWidgets for desktop apps, it's IMO the better technology for that unless your data is simple and you want it to look like a typical touch UI for some reason.

Re:Writing a blatant Telegram clone using Qt, QML and Rust. ... by IshKebab on Wednesday December 17, 2025 @02:41AM (#46299253)
Fortunately you can still just use QtWidgets. You just don't get fancy animations.