2 ms·
Avalonia https://avaloniaui.net/ https://avaloniaui.net/ QML https://doc.qt.io/qt-6/qmlapplications.html https://doc.qt.io/qt-6/qmlapplications.html and other o
by viraptor 3y ago
Avalonia https://avaloniaui.net/ https://avaloniaui.net/ QML https://doc.qt.io/qt-6/qmlapplications.html https://doc.qt.io/qt-6/qmlapplications.html and other options exist. The choice is not between Electron or native. There's lots of options in between "everything native from scratch" and "ship the whole browser".
Also for many electron apps you're going to write a native component too.
- alwayslikethis 3y agoBy the point you are using QML I don't think it's actually that much lighter than Electron. QtWidgets is probably justifiably better in this regard. Not all electron apps have to be as bloated as Slack, for example. It's possible to design sane applications.
- rubymamis 3y agoQML is very efficient. Much of custom QML code ones write actually compiles to C++[1]. All the code of Qt Quick components are written in C++ as well. I'm now creating a block editor in Qt C++ (model) and QML (view) that is 4x faster than that fastest comparable native app on macOS[2]. So, yes, it's possible to write very efficient code with QML. [1] https://www.qt.io/blog/qml-type-compilation https://www.qt.io/blog/qml-type-compilation [2] https://www.get-plume.com/ https://www.get-plume.com/
- viraptor 3y agoNo, it's still not the same category. QML doesn't pull in a full featured Chrome with all its runtimes, dom, full scripting, multiple levels of JIT, etc. You're still significantly lighter. Even Avalonia with bundled .net is lighter.