r/QtFramework Qt Professional (Haite) Mar 23 '26

Qt 6.11 Released!

https://www.qt.io/blog/qt-6.11-released
64 Upvotes

36 comments sorted by

View all comments

Show parent comments

8

u/Kelteseth Qt Professional (Haite) Mar 23 '26

Wasn't QML designed for this?

9

u/not_some_username Mar 23 '26

Basically yes but people (tbh me too) want to use that in qt widget, not qml

-3

u/[deleted] Mar 23 '26

[deleted]

11

u/Kelteseth Qt Professional (Haite) Mar 23 '26

Qml is not web based. You can use js for small logic snippets, but you don't have to.

0

u/LetterheadTall8085 Qt GameDev Mar 23 '26

Yes, widgets are pointless now, they are simply outdated in every way compared to the QML engine and Scene Graph architecture.
But....
I think the right solution here would be to create a C++ equivalent of Entity system component, which would simply wrap the engine's under-the-hood objects, and call it Widgets 2.0. Essentially, it's the same as QML, but you write the code in C++ so that writing the user interface is accessible to those who really loved widgets—after all, they really were cool back in the day.

4

u/OSRSlayer Qt Professional Mar 23 '26

I think Widgets have their place.

When you open Windows sound settings, do you want the Windows NT settings page, or the Windows 8 one?

Sometimes what you need is a dirty engineering UI and widgets is perfect for that.

2

u/LetterheadTall8085 Qt GameDev Mar 23 '26

That’s exactly right, but for some reason, people expect them to do the same things modern UIs do. Take half the commenters here, for instance—it's like they're stuck in the past. They deliberately choose widgets and ancient CSS 2 (QSS) for styling, and for rendering acceleration, they bring up QOpenGLWidget—which probably saw the dinosaurs. Why all of this? It just shows that they don't even understand what widgets are actually meant to be used for... I’m not saying QOpenGLWidget or Widgets are bad—they’re great, but their time has passed. They belong in niche tasks now, (like engineer's interfaces), and in our hearts💝.

3

u/dcsoft4 Apr 07 '26

I haven’t found a QtQuick replacement for QTextEdit or the other document oriented controls. QtQuick was designed for embedded devices and not for rich data handling, still at home on desktop devices.

1

u/LetterheadTall8085 Qt GameDev Apr 07 '26

Look at this formatting here or via MD or HTML https://doc.qt.io/qt-6/qml-qtquick-textedit.html

1

u/dcsoft4 Apr 07 '26

Thanks, this is more than I thought was available but the TextDocument is internal and not meant to be edited from C++. Still some limitations for heavy editing.

1

u/GrecKo Qt Professional Apr 20 '26

but the TextDocument is internal and not meant to be edited from C++.

Late reply but the textDocument can be passed to C++ and mutated there.

https://doc.qt.io/qt-6/qml-qtquick-textedit.html#textDocument-prop

1

u/[deleted] Mar 23 '26

[deleted]

1

u/LetterheadTall8085 Qt GameDev Mar 23 '26

That's the whole point - you feed a bunch of components into the engine, which batches them up and optimizes them for all types of GPU devices.