5 ms·
For Qt (QML/QtQuick; Widgets are no linger the preferred method afaik) you have qmetaobjects-rs, which is reeally nice.
by Tmpod 5y ago
For Qt (QML/QtQuick; Widgets are no linger the preferred method afaik) you have qmetaobjects-rs, which is reeally nice.
- mappu 5y agoQML is practically electron - it's runtime interpreted declarative UI plus a Javascript engine. QML still has only rudimentary support for AOT compilation. Both the old qmlcompiler and the new qmlsc compiler are commercial-only: https://www.qt.io/blog/the-new-qtquick-compiler-technology https://www.qt.io/blog/the-new-qtquick-compiler-technology . LGPL users only get the interpreter. Widgets is still the 'Real Qt'. Some very modern, responsive-layout desktop apps like Telegram are written entirely with Widgets.
- heavyset_go 5y ago> QML is practically electron - it's runtime interpreted declarative UI plus a Javascript engine. It uses significantly less resources and QML and QtQuick are pretty nice to work with compared to targeting a weird embedded browser with HTML, CSS and JS.
- viraptor 5y agoHaving a declarative UI does not make it comparable to Electron. Same as XAML is not comparable. They don't embed the whole browser.
- ognarb 5y agoqmlcompiler is open source and the new qmlsc is also open source. It's just the extensions that helps making your qml code compatible with the new compiler that isn't open source. This is indeed annoying but not everything is commercial only.
- mappu 5y agoWhere can I find the source code for qmlcompiler and qmlsc? qmltc and qmlcachegen are available in the qtdeclarative.git repo (on either code.qt.io or GitHub) but i can't find qmlcompiler nor qmlsc anywhere. I believe they are commercial only under the "Qt for Device Creation" license.
- nyanpasu64 5y agoI found a qmlcompiler folder at https://github.com/qt/qtdeclarative/tree/dev/src/qmlcompiler https://github.com/qt/qtdeclarative/tree/dev/src/qmlcompiler, but I don't know if it's the compiler itself or bindings. I can't find qmlsc in GitHub qt or qtproject though.
- Sophistifunk 5y ago> practically electron - it's runtime interpreted declarative UI plus a Javascript engine Except, none of that is what's wrong with Electron. What's wrong with Electron is the bloat inherent in being an entire web browser, and the fact that the DOM+CSS is terrible for UI development.
- kombine 5y agoI'm so glad someone said it. I have long stopped working in GUI space, but I remember how horrible HTML/CSS is for app development and how great and flexible Qt was. Even more frustrating seeing where the industry is going now with Electron.
- throwaway2037 5y agoReal question: You wrote "responsive-layout desktop app". What do you mean by this term? From my experience, if you develop Qt widgets (like dialogs with many child widgets), it is possible (some might say easy) to make things resize correctly by using QHBoxLayout (horizontal) and QVBoxLayout (vertical).
- mappu 5y agoI meant "Responsive" to mean something like media query breakpoints - at certain widths, Telegram will rearrange entire UI elements and change the navigation paradigm.
- lucaotta 5y ago> QML is practically electron Nope. Electron is a whole browser under your seat, QML is a declarative language to instantiate C++ UI objects. The core logic of your application is written in C++/Qt instead of Javascript. > QML still has only rudimentary support for AOT compilation Fair point. But it shouldn't really matter in any application today, as your logic must reside in C++ models if you want to have real performance.