Live data from Hacker News

Developing a Beautiful and Performant Block Editor in Qt C++ and QML

rubymamistvalove.com

31–40 of 66 posts

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#31
post #3

This is brilliant work and I love the Qt ecosystem. Can’t help but imagine the things we could’ve had if Apple wasn’t pushing the horror of Swift down everyone’s throat by blocking alternatives in so many tiny ways.

Swift and SwiftUI on macOS are the most complete UI framework that is native, fast, performant and works very well. Basically no other platform comes even close in terms of ease of use and performance. The best would be to extend that kind of framework on Windows (and/or Linux) and make it work same / similar.

I've never used SwiftUI (nor Apple platforms) personally but I find its approach elegant.

This is an attempt to build apps with SwiftUI idiomatics https://aparoksha.dev/ (blog on it here https://www.swift.org/blog/adwaita-swift/). It's implemented using SwiftUI on MacOS, WinUI on Windows and libadwaita on Linux.

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#32
> There's a misconception that you can't statically link your app when using the open-source LGPL version of Qt. From my reading of the LGPL license this doesn't appear to be the case. The LGPL allows you to statically link your app as long as you provide the object files and allow users to relink your app with a different version of Qt. I've observed many people spreading this misinformation about only being able to dynamically link with the LGPL version of Qt.

I mean... is it possible to statically link while giving an option to re-link an application using different set of libraries?

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#33
I developed a new database management system and I needed a GUI application to use as an admin tool for it.

I decided to build it using Qt (Qt Widgets in c++) mainly because my whole data engine is also in c++. Since it just uses standard windows and dialog boxes; I haven't felt the need to keep up with the latest Qt version. I am still using Qt 5 (I think revision 13 or 15).

I have been contemplating moving to Qt 6. Have users noticed a big difference (e.g. performance) between Qt 5 and Qt 6?

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#34

I've worked with QtWidgets and I have mixed feelings about the extensive (1) documentation about integrating C++ with QML and QtQuick. Here's a quick history lesson (as I understand it): - QtWidgets the original C++ QT graphics library. - Around 2008 or something, they introduced QML and QtQuick. This was basically declarative UI + javascript for logic. - QtWidgets is considered 'done' and all new features and dev is…

I used Qt back in the day, pre-Nokia, when it was just QtWidgets for cross-platform (Linux/Windows/Mac) desktop apps. I just wanted a decent C++ library/API to create the GUI for a Linux app (real-time spectrogram). It was a great for this, although I was never a fan of MOC - I wish they had committed to a pure/native C++ design.

For me Qt lost it's way when Trolltech was acquired by Nokia, and the focus became mobile rather than desktop, with different UI requirements resulting in QML/QtQuick being added.

Maybe the earlier addition of QtScript (or even MOC!) was a foreshadowing of what was to come, but in any case what had been a great cross-platform desktop UI toolkit, and the primary C++ one for Linux (with GTK being more C focused) ended up orphaning it's desktop roots to focus on mobile instead, having become a sprawling mish-mash of languages, GUI component technologies and scripting.

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#35

I developed a new database management system and I needed a GUI application to use as an admin tool for it. I decided to build it using Qt (Qt Widgets in c++) mainly because my whole data engine is also in c++. Since it just uses standard windows and dialog boxes; I haven't felt the need to keep up with the latest Qt version. I am still using Qt 5 (I think revision 13 or 15). I have been contemplating moving to Qt 6.…

There shouldn't be any noticeable performance difference between Qt 5 and Qt 6, unless you're using QML.

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#36
post #19

> and Microsoft tends to abandon each new UI framework every five years So use the old one? Your first link literally mentions two ancient frameworks that are not abandoned (win32 and MFC) But you're right > So, it's more useful to ask: what do we expect from good native apps? The challenge, though, is there isn't really a good comprehensive list of those things the would allow you to compare the framework you use to…

>Your first link literally mentions two ancient frameworks that are not abandoned (win32 and MFC)

Do UIs built with MFC still look like they were built in the 1990s?

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#37
post #19

> and Microsoft tends to abandon each new UI framework every five years So use the old one? Your first link literally mentions two ancient frameworks that are not abandoned (win32 and MFC) But you're right > So, it's more useful to ask: what do we expect from good native apps? The challenge, though, is there isn't really a good comprehensive list of those things the would allow you to compare the framework you use to…

>Your first link literally mentions two ancient frameworks that are not abandoned (win32 and MFC) Do UIs built with MFC still look like they were built in the 1990s?

Paraphrasing

> it's possible to achieve non90s styling qualities using those frameworks

But also if it's not, then use that as an argument instead of the non sequitur of the abandoned new

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#38

I developed a new database management system and I needed a GUI application to use as an admin tool for it. I decided to build it using Qt (Qt Widgets in c++) mainly because my whole data engine is also in c++. Since it just uses standard windows and dialog boxes; I haven't felt the need to keep up with the latest Qt version. I am still using Qt 5 (I think revision 13 or 15). I have been contemplating moving to Qt 6.…

QML isn't slower than Qt QWidgets, in the end of the day Qt Quick components are simply C++ objects, you can look at the source code[1].

[1] https://github.com/qt/qtdeclarative

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#39
post #15

I've worked with QtWidgets and I have mixed feelings about the extensive (1) documentation about integrating C++ with QML and QtQuick. Here's a quick history lesson (as I understand it): - QtWidgets the original C++ QT graphics library. - Around 2008 or something, they introduced QML and QtQuick. This was basically declarative UI + javascript for logic. - QtWidgets is considered 'done' and all new features and dev is…

Generally, QtWidgets is better suited for making traditional desktop UIs with dialog boxes, common controls, etc... It is not really in the spirit of QtWidgets to do things like custom behavior, animation, etc... You do whatever the host OS gives you, in fact, you don't even care, that's Qt's job. QML is better suited for apps that want full control of their UIs, styling, etc... Which is a more modern way (doesn't me…

> Instead, you use Qt Designer, a graphical tool that works on .ui files (xml), that are then compiled into C++ classes that your derive from, which is a form of binding between two languages…

There’s only one language; no bridge. No javascript.

This is largely my point; qt designer already has a more-or-less declarative ui layout language, you just write your event handlers and code in c.

If “declarative” is the reason you’re using QML (and it’s the only specific reason the OP mentioned) it’s probably the wrong reason to be using it.

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#40

I developed a new database management system and I needed a GUI application to use as an admin tool for it. I decided to build it using Qt (Qt Widgets in c++) mainly because my whole data engine is also in c++. Since it just uses standard windows and dialog boxes; I haven't felt the need to keep up with the latest Qt version. I am still using Qt 5 (I think revision 13 or 15). I have been contemplating moving to Qt 6.…

There shouldn't be any noticeable performance difference between Qt 5 and Qt 6, unless you're using QML.

I have products using both Qt 5 and Qt 6. Qt 6 seems better at coping with high resolutions screens, but I haven't noticed a lot of other differences.
Post reply on HN